Index: chrome/browser/google/google_util.cc |
diff --git a/chrome/browser/google/google_util.cc b/chrome/browser/google/google_util.cc |
index 50900bdefd099c02ef9d42944c632c233972d26e..df4433d402b9cd883d33f1bef5a613cee3f866df 100644 |
--- a/chrome/browser/google/google_util.cc |
+++ b/chrome/browser/google/google_util.cc |
@@ -93,7 +93,8 @@ std::string StringAppendGoogleLocaleParam(const std::string& url) { |
GURL AppendGoogleTLDParam(Profile* profile, const GURL& url) { |
const std::string google_domain( |
net::RegistryControlledDomainService::GetDomainAndRegistry( |
- GoogleURLTracker::GoogleURL(profile))); |
+ GoogleURLTracker::GoogleURL(profile), |
+ net::RCDS::EXCLUDE_PRIVATE_REGISTRIES)); |
const size_t first_dot = google_domain.find('.'); |
if (first_dot == std::string::npos) { |
NOTREACHED(); |
@@ -178,7 +179,10 @@ bool IsGoogleDomainUrl(const std::string& url, |
bool IsGoogleHostname(const std::string& host, |
SubdomainPermission subdomain_permission) { |
size_t tld_length = |
- net::RegistryControlledDomainService::GetRegistryLength(host, false); |
+ net::RegistryControlledDomainService::GetRegistryLength( |
+ host, |
+ net::RCDS::EXCLUDE_UNKNOWN_REGISTRIES, |
+ net::RCDS::EXCLUDE_PRIVATE_REGISTRIES); |
if ((tld_length == 0) || (tld_length == std::string::npos)) |
return false; |
std::string host_minus_tld(host, 0, host.length() - tld_length); |