[cr141][iOS] IsTopDomain moved to components/url_formatter/url_formatter.h

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/2b1c8832902cca733d0cb34047404ca3498c1edb

commit 2b1c8832902cca733d0cb34047404ca3498c1edb
Author: Paloma Lever <palever@microsoft.com>
Date:   Mon Aug 18 13:30:23 2025 -0700

    Reland "Moving `IsTopDomain` implementation from `lookalikes` to `IDNSpoofChecker`"

    This is a reland of commit a87a9fc6ea152ff4f94a3ac6afcf4345eb0fca7d

    Original change's description:
    > Moving `IsTopDomain` implementation from `lookalikes` to `IDNSpoofChecker`
    >
    > The core logic and data for checking top domains is managed by the
    > `IDNSpoofChecker` class. This change ensures that the functions
    > operating on this data are part of the class that own it, adhering to
    > the "Data Locality" design principle.
    >
    > By exposing this functionality through `url_formatter`, the check
    > becomes a reusable utility for other features without creating a
    > dependency on the `lookalikes` component. Lookalike logic has been
    > updated to use these new functions.
This commit is contained in:
Max Karolinskiy
2025-09-22 14:59:47 -04:00
parent 73d9e0667f
commit cba7d94347
+1 -1
View File
@@ -163,7 +163,7 @@ BraveSpoofCheckerLookalikeURLMatchType const
lookalikes::GetDomainInfo(response_url);
// Empty domain_and_registry happens on private domains.
if (navigated_domain.domain_and_registry.empty() ||
IsTopDomain(navigated_domain)) {
url_formatter::IsTopDomain(response_url)) {
return [[BraveURLSpoofCheckerResult alloc]
initWithMatchType:lookalikes::LookalikeUrlMatchType::kNone
suggestedURL:nil];