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

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

Issue 15140003: Add support for split Public Suffix List distinctions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again Created 7 years, 7 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_dom_feature_extractor.cc
diff --git a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc
index 0be384edc30d3759171312ad3c15a8d179e01d8b..9823c8c02dea2a4bfe5bf81167b702cdffbd8066 100644
--- a/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc
+++ b/chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc
@@ -386,8 +386,9 @@ void PhishingDOMFeatureExtractor::ResetFrameData() {
cur_frame_data_.reset(new FrameData());
cur_frame_data_->elements = cur_document_.all();
cur_frame_data_->domain =
- net::RegistryControlledDomainService::GetDomainAndRegistry(
- cur_document_.url());
+ net::registry_controlled_domains::GetDomainAndRegistry(
+ cur_document_.url(),
+ net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
}
WebKit::WebDocument PhishingDOMFeatureExtractor::GetNextDocument() {
@@ -422,8 +423,8 @@ bool PhishingDOMFeatureExtractor::IsExternalDomain(const GURL& url,
if (url.HostIsIPAddress()) {
domain->assign(url.host());
} else {
- domain->assign(net::RegistryControlledDomainService::GetDomainAndRegistry(
- url));
+ domain->assign(net::registry_controlled_domains::GetDomainAndRegistry(
+ url, net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES));
}
return !domain->empty() && *domain != cur_frame_data_->domain;

Powered by Google App Engine
This is Rietveld 408576698