diff options
Diffstat (limited to 'chromium/net/base/url_util.h')
-rw-r--r-- | chromium/net/base/url_util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chromium/net/base/url_util.h b/chromium/net/base/url_util.h index ad3b3db64a2..41793202b2b 100644 --- a/chromium/net/base/url_util.h +++ b/chromium/net/base/url_util.h @@ -131,6 +131,13 @@ NET_EXPORT std::string GetHostOrSpecFromURL(const GURL& url); // GetSuperdomain("127.0.0.1") -> "0.0.1" NET_EXPORT std::string GetSuperdomain(base::StringPiece domain); +// Returns whether |subdomain| is a subdomain of (or identical to) +// |superdomain|, if both are hostnames (not IP addresses -- for which this +// function is nonsensical). Does not consider the Public Suffix List. +// Returns true if both input strings are empty. +NET_EXPORT bool IsSubdomainOf(base::StringPiece subdomain, + base::StringPiece superdomain); + // Canonicalizes |host| and returns it. Also fills |host_info| with // IP address information. |host_info| must not be NULL. NET_EXPORT std::string CanonicalizeHost(base::StringPiece host, |