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

Unified Diff: chrome/browser/autocomplete/history_url_provider.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/autocomplete/history_url_provider.cc
diff --git a/chrome/browser/autocomplete/history_url_provider.cc b/chrome/browser/autocomplete/history_url_provider.cc
index 985509555da347f4eba4daf6dab2fe3c713390e7..52eebe2aa9f1fc2f5e9dc706ca135b4597bb03c8 100644
--- a/chrome/browser/autocomplete/history_url_provider.cc
+++ b/chrome/browser/autocomplete/history_url_provider.cc
@@ -795,8 +795,12 @@ bool HistoryURLProvider::CanFindIntranetURL(
return false;
const std::string host(UTF16ToUTF8(
input.text().substr(input.parts().host.begin, input.parts().host.len)));
- return (net::RegistryControlledDomainService::GetRegistryLength(host,
- false) == 0) && db->IsTypedHost(host);
+ const size_t registry_length =
+ net::registry_controlled_domains::GetRegistryLength(
+ host,
+ net::registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES,
+ net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
+ return registry_length == 0 && db->IsTypedHost(host);
}
bool HistoryURLProvider::PromoteMatchForInlineAutocomplete(
« no previous file with comments | « chrome/browser/autocomplete/history_quick_provider.cc ('k') | chrome/browser/browsing_data/cookies_tree_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698