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

Unified Diff: net/base/url_util.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: net/base/url_util.cc
diff --git a/net/base/url_util.cc b/net/base/url_util.cc
index 8d47bd3be29321d4aca20f0a52bbccfeb812e57f..111c95400a821e9ab53a8ec3fd7988e35c92243e 100644
--- a/net/base/url_util.cc
+++ b/net/base/url_util.cc
@@ -342,10 +342,9 @@ bool IsHostnameNonUnique(const std::string& hostname) {
// is updated. However, because gTLDs are expected to provide significant
// advance notice to deprecate older versions of this code, this an
// acceptable tradeoff.
- return 0 == registry_controlled_domains::GetRegistryLength(
- canonical_name,
- registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES,
- registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
+ return !registry_controlled_domains::HostHasRegistryControlledDomain(
+ canonical_name, registry_controlled_domains::EXCLUDE_UNKNOWN_REGISTRIES,
+ registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES);
}
bool IsLocalhost(base::StringPiece host) {
« no previous file with comments | « net/base/registry_controlled_domains/registry_controlled_domain_unittest.cc ('k') | net/cert/cert_verify_proc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698