Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4199)

Unified Diff: chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc

Issue 2456643005: Reduce buggy usage of the registry controlled domain service. (Closed)
Patch Set: Fix Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc
diff --git a/chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc b/chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc
index 65351c638c3fb3300864e9bf333b4b4bd15a5a56..49962f8639a89015856212bd8581d9c4a85e241b 100644
--- a/chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc
+++ b/chrome/renderer/safe_browsing/phishing_url_feature_extractor.cc
@@ -40,9 +40,8 @@ bool PhishingUrlFeatureExtractor::ExtractFeatures(const GURL& url,
// Disallow unknown registries so that we don't classify
// partial hostnames (e.g. "www.subdomain").
size_t registry_length =
- net::registry_controlled_domains::GetRegistryLength(
- host,
- net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES,
+ net::registry_controlled_domains::GetCanonicalHostRegistryLength(
+ host, net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES,
net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
if (registry_length == 0 || registry_length == std::string::npos) {
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_url_filter.cc ('k') | components/google/core/browser/google_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698