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

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

Issue 2405483002: Make the request initiator Optional (Closed)
Patch Set: Introduce NullableOrigin to use for request initiator Created 4 years, 2 months 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 8d379ba91b7f486df8d6593bf76ff13de8b5f885..8b751548dce420b45a75bf233852f888030dd1b3 100644
--- a/net/base/registry_controlled_domains/registry_controlled_domain.cc
+++ b/net/base/registry_controlled_domains/registry_controlled_domain.cc
@@ -223,6 +223,14 @@ bool SameDomainOrHost(const url::Origin& origin1,
filter);
}
+bool SameDomainOrHost(const url::Origin& origin1,
+ url::NullableOrigin* origin2,
+ PrivateRegistryFilter filter) {
+ if (!origin2)
+ return false;
+ return SameDomainOrHost(origin1, *origin2, filter);
+}
+
size_t GetRegistryLength(
const GURL& gurl,
UnknownRegistryFilter unknown_filter,

Powered by Google App Engine
This is Rietveld 408576698