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

Unified Diff: net/base/url_util.h

Issue 1629733002: net: move IsHostnameNonUnique() into url_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix ssl_errors Created 4 years, 11 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
« no previous file with comments | « net/base/net_util_unittest.cc ('k') | net/base/url_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/url_util.h
diff --git a/net/base/url_util.h b/net/base/url_util.h
index a86a9e02d4021f891bbbcda68e3f9d4eeb5f83d0..dc9ae0cc0169f8340bfa4bdaddf53342df7cbeeb 100644
--- a/net/base/url_util.h
+++ b/net/base/url_util.h
@@ -132,6 +132,11 @@ NET_EXPORT std::string CanonicalizeHost(base::StringPiece host,
// CanonicalizeHost(), or you may not get accurate results.
NET_EXPORT bool IsCanonicalizedHostCompliant(const std::string& host);
+// Returns true if |hostname| contains a non-registerable or non-assignable
+// domain name (eg: a gTLD that has not been assigned by IANA) or an IP address
+// that falls in an IANA-reserved range.
+NET_EXPORT bool IsHostnameNonUnique(const std::string& hostname);
+
// Strip the portions of |url| that aren't core to the network request.
// - user name / password
// - reference section
« no previous file with comments | « net/base/net_util_unittest.cc ('k') | net/base/url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698