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 bbe8f0b8145bf1b1c74abbb18de16e5ba959ee95..9e631f6f130f99159bbaaba77b7c5519e3dd935f 100644 |
--- a/net/base/registry_controlled_domains/registry_controlled_domain.h |
+++ b/net/base/registry_controlled_domains/registry_controlled_domain.h |
@@ -117,6 +117,7 @@ |
#include <string> |
+#include "base/optional.h" |
#include "base/strings/string_piece.h" |
#include "net/base/net_export.h" |
@@ -199,6 +200,10 @@ NET_EXPORT bool SameDomainOrHost(const GURL& gurl1, const GURL& gurl2, |
NET_EXPORT bool SameDomainOrHost(const url::Origin& origin1, |
const url::Origin& origin2, |
PrivateRegistryFilter filter); |
+// Note: this returns false if |origin2| is not set. |
+NET_EXPORT bool SameDomainOrHost(const url::Origin& origin1, |
+ const base::Optional<url::Origin>& origin2, |
+ PrivateRegistryFilter filter); |
// Finds the length in bytes of the registrar portion of the host in the |
// given GURL. Returns std::string::npos if the GURL is invalid or has no |