| Index: chrome/browser/supervised_user/supervised_user_url_filter.cc
|
| diff --git a/chrome/browser/supervised_user/supervised_user_url_filter.cc b/chrome/browser/supervised_user/supervised_user_url_filter.cc
|
| index d2263138502cf31708946acc92bf74c88f9486a3..5ef1ab63730283adf7be8cfe6d76e59bd289866a 100644
|
| --- a/chrome/browser/supervised_user/supervised_user_url_filter.cc
|
| +++ b/chrome/browser/supervised_user/supervised_user_url_filter.cc
|
| @@ -39,7 +39,7 @@
|
| using content::BrowserThread;
|
| using net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES;
|
| using net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES;
|
| -using net::registry_controlled_domains::GetRegistryLength;
|
| +using net::registry_controlled_domains::GetRegistryLengthForCanonicalHost;
|
| using policy::URLBlacklist;
|
| using url_matcher::URLMatcher;
|
| using url_matcher::URLMatcherConditionSet;
|
| @@ -280,12 +280,13 @@ bool SupervisedUserURLFilter::HasFilteredScheme(const GURL& url) {
|
| }
|
|
|
| // static
|
| -bool SupervisedUserURLFilter::HostMatchesPattern(const std::string& host,
|
| - const std::string& pattern) {
|
| +bool SupervisedUserURLFilter::HostMatchesPattern(
|
| + const std::string& canonical_host,
|
| + const std::string& pattern) {
|
| std::string trimmed_pattern = pattern;
|
| - std::string trimmed_host = host;
|
| + std::string trimmed_host = canonical_host;
|
| if (base::EndsWith(pattern, ".*", base::CompareCase::SENSITIVE)) {
|
| - size_t registry_length = GetRegistryLength(
|
| + size_t registry_length = GetRegistryLengthForCanonicalHost(
|
| trimmed_host, EXCLUDE_UNKNOWN_REGISTRIES, EXCLUDE_PRIVATE_REGISTRIES);
|
| // A host without a known registry part does not match.
|
| if (registry_length == 0)
|
|
|