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

Unified Diff: net/base/registry_controlled_domains/registry_controlled_domain.cc

Issue 2405483002: Make the request initiator Optional (Closed)
Patch Set: Addressed comments + rebase Created 4 years, 1 month 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
Index: net/base/registry_controlled_domains/registry_controlled_domain.cc
diff --git a/net/base/registry_controlled_domains/registry_controlled_domain.cc b/net/base/registry_controlled_domains/registry_controlled_domain.cc
index 645a4f2132571886bd5bb25c26a2fcccfe692f08..493ea68678b0b2a11d1817f42eefa33328894dc2 100644
--- a/net/base/registry_controlled_domains/registry_controlled_domain.cc
+++ b/net/base/registry_controlled_domains/registry_controlled_domain.cc
@@ -354,6 +354,14 @@ bool SameDomainOrHost(const url::Origin& origin1,
return SameDomainOrHost(origin1.GetURL(), origin2.GetURL(), filter);
}
+bool SameDomainOrHost(const url::Origin& origin1,
+ const base::Optional<url::Origin>& origin2,
+ PrivateRegistryFilter filter) {
+ if (!origin2.has_value())
+ return false;
+ return SameDomainOrHost(origin1, origin2.value(), filter);
+}
+
size_t GetRegistryLength(
const GURL& gurl,
UnknownRegistryFilter unknown_filter,
« no previous file with comments | « net/base/registry_controlled_domains/registry_controlled_domain.h ('k') | net/url_request/test_url_fetcher_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698