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 f32da08ea3486bcf2f546b9ca965cdab1f5ca97d..0fd9c7db713c657689335ca0433e3e3e436f7067 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::GetCanonicalHostRegistryLength; |
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 = GetCanonicalHostRegistryLength( |
trimmed_host, EXCLUDE_UNKNOWN_REGISTRIES, EXCLUDE_PRIVATE_REGISTRIES); |
// A host without a known registry part does not match. |
if (registry_length == 0) |