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

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

Issue 1783813002: SameSite: Strict/Lax behavior. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@strict-lax
Patch Set: Comment. Created 4 years, 9 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 0d98eada13b9c7c700e385c7e30c79560b2a5f34..8d379ba91b7f486df8d6593bf76ff13de8b5f885 100644
--- a/net/base/registry_controlled_domains/registry_controlled_domain.cc
+++ b/net/base/registry_controlled_domains/registry_controlled_domain.cc
@@ -52,6 +52,7 @@
#include "net/base/net_module.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
+#include "url/origin.h"
#include "url/third_party/mozilla/url_parse.h"
namespace net {
@@ -215,6 +216,13 @@ bool SameDomainOrHost(
host1.len);
}
+bool SameDomainOrHost(const url::Origin& origin1,
+ const url::Origin& origin2,
+ PrivateRegistryFilter filter) {
+ return SameDomainOrHost(GURL(origin1.Serialize()), GURL(origin2.Serialize()),
+ filter);
+}
+
size_t GetRegistryLength(
const GURL& gurl,
UnknownRegistryFilter unknown_filter,

Powered by Google App Engine
This is Rietveld 408576698