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

Unified Diff: chrome/browser/safe_browsing/ui_manager.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/browser/safe_browsing/ui_manager.cc
diff --git a/chrome/browser/safe_browsing/ui_manager.cc b/chrome/browser/safe_browsing/ui_manager.cc
index 4d60ecea7d234f0085d1f6f2ccddd7474dc01618..e060a6ef9fcc8a37a61030f69b6e6859954fbb14 100644
--- a/chrome/browser/safe_browsing/ui_manager.cc
+++ b/chrome/browser/safe_browsing/ui_manager.cc
@@ -254,8 +254,9 @@ void SafeBrowsingUIManager::UpdateWhitelist(const UnsafeResource& resource) {
WhiteListedEntry entry;
entry.render_process_host_id = resource.render_process_host_id;
entry.render_view_id = resource.render_view_id;
- entry.domain = net::RegistryControlledDomainService::GetDomainAndRegistry(
- resource.url);
+ entry.domain = net::registry_controlled_domains::GetDomainAndRegistry(
+ resource.url,
+ net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
entry.threat_type = resource.threat_type;
white_listed_entries_.push_back(entry);
}
@@ -276,11 +277,11 @@ bool SafeBrowsingUIManager::IsWhitelisted(const UnsafeResource& resource) {
(entry.threat_type == SB_THREAT_TYPE_URL_PHISHING &&
resource.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL) ||
(entry.threat_type == SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL &&
- resource.threat_type == SB_THREAT_TYPE_URL_PHISHING)) &&
- entry.domain ==
- net::RegistryControlledDomainService::GetDomainAndRegistry(
- resource.url)) {
- return true;
+ resource.threat_type == SB_THREAT_TYPE_URL_PHISHING))) {
+ return entry.domain ==
+ net::registry_controlled_domains::GetDomainAndRegistry(
+ resource.url,
+ net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
}
}
return false;
« no previous file with comments | « chrome/browser/predictors/logged_in_predictor_table.cc ('k') | chrome/browser/ui/omnibox/alternate_nav_url_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698