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

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

Issue 2405483002: Make the request initiator Optional (Closed)
Patch Set: Rewrite using base::Optional 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
« no previous file with comments | « net/base/registry_controlled_domains/registry_controlled_domain.h ('k') | net/url_request/url_request.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4d0d781186cc5643e138691bb42aeb2bdc1b5eec..91bcf2a848f2d6bda1742181065d48c8980abfff 100644
--- a/net/base/registry_controlled_domains/registry_controlled_domain.cc
+++ b/net/base/registry_controlled_domains/registry_controlled_domain.cc
@@ -222,6 +222,13 @@ 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) {
+ return SameDomainOrHost(
+ origin1, origin2.has_value() ? origin2.value() : url::Origin(), filter);
Mike West 2016/10/14 13:05:59 Rather than passing in `url::Origin()`, could you
clamy 2016/10/19 16:00:43 Done.
+}
+
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/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698