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

Unified Diff: url/url_util.h

Issue 2562813003: Merge logic for SameDomainOrHost for GURLs and Origins (Closed)
Patch Set: brettw review Created 4 years 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 | « url/gurl.cc ('k') | url/url_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/url_util.h
diff --git a/url/url_util.h b/url/url_util.h
index 724ce956a7ffa95010218717db15342f0d0d4dd5..e9da9b21137edd6f70108847920f17206d5bc769 100644
--- a/url/url_util.h
+++ b/url/url_util.h
@@ -133,7 +133,7 @@ URL_EXPORT bool GetStandardSchemeType(const char* spec,
const Component& scheme,
SchemeType* type);
-// Domains ---------------------------------------------------------------------
+// Hosts ----------------------------------------------------------------------
// Returns true if the |canonicalized_host| matches or is in the same domain as
// the given |lower_ascii_domain| string. For example, if the canonicalized
@@ -146,6 +146,10 @@ URL_EXPORT bool GetStandardSchemeType(const char* spec,
URL_EXPORT bool DomainIs(base::StringPiece canonicalized_host,
base::StringPiece lower_ascii_domain);
+// Returns true if the hostname is an IP address. Note: this function isn't very
+// cheap, as it must re-parse the host to verify.
+URL_EXPORT bool HostIsIPAddress(base::StringPiece host);
+
// URL library wrappers --------------------------------------------------------
// Parses the given spec according to the extracted scheme type. Normal users
« no previous file with comments | « url/gurl.cc ('k') | url/url_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698