Index: net/base/registry_controlled_domains/registry_controlled_domain.h |
diff --git a/net/base/registry_controlled_domains/registry_controlled_domain.h b/net/base/registry_controlled_domains/registry_controlled_domain.h |
index 89aa6d6c18bc351d26a862a8f8fa79ef70aa325f..19514def02535e8f045798bfcf9d361216775ad8 100644 |
--- a/net/base/registry_controlled_domains/registry_controlled_domain.h |
+++ b/net/base/registry_controlled_domains/registry_controlled_domain.h |
@@ -195,11 +195,15 @@ NET_EXPORT base::StringPiece GetDomainAndRegistryAsStringPiece( |
NET_EXPORT std::string GetDomainAndRegistry(base::StringPiece host, |
PrivateRegistryFilter filter); |
+// Returns whether the hosts of the GURLs are identical. |
engedy
2016/10/21 08:43:22
nit: Maybe we could put this into the anonymous na
|
+NET_EXPORT bool SameHost(const GURL& gurl1, const GURL& gurl2); |
+ |
// These convenience functions return true if the two GURLs or Origins both have |
// hosts and one of the following is true: |
// * They each have a known domain and registry, and it is the same for both |
// URLs. Note that this means the trailing dot, if any, must match too. |
-// * They don't have known domains/registries, but the hosts are identical. |
+// * They don't have known domains/registries, but the hosts are identical |
+// (determined by the SameHost function above). |
// Effectively, callers can use this function to check whether the input URLs |
// represent hosts "on the same site". |
NET_EXPORT bool SameDomainOrHost(const GURL& gurl1, const GURL& gurl2, |