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

Unified Diff: net/cookies/cookie_monster.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
« no previous file with comments | « net/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_options.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/cookie_monster.cc
diff --git a/net/cookies/cookie_monster.cc b/net/cookies/cookie_monster.cc
index a4f99dc3ec748961552323b4864f763983492b68..aaecaf9a2657da8be6e1c6ad442a3a2805d86efd 100644
--- a/net/cookies/cookie_monster.cc
+++ b/net/cookies/cookie_monster.cc
@@ -1044,7 +1044,8 @@ bool CookieMonster::SetCookieWithDetails(const GURL& url,
CookieOptions options;
options.set_include_httponly();
- options.set_include_same_site();
+ options.set_same_site_cookie_mode(
+ CookieOptions::SameSiteCookieMode::INCLUDE_STRICT_AND_LAX);
if (enforce_strict_secure)
options.set_enforce_strict_secure();
return SetCanonicalCookie(std::move(cc), options);
@@ -1198,7 +1199,8 @@ void CookieMonster::DeleteCookie(const GURL& url,
CookieOptions options;
options.set_include_httponly();
- options.set_include_same_site();
+ options.set_same_site_cookie_mode(
+ CookieOptions::SameSiteCookieMode::INCLUDE_STRICT_AND_LAX);
// Get the cookies for this host and its domain(s).
std::vector<CanonicalCookie*> cookies;
FindCookiesForHostAndDomain(url, options, &cookies);
@@ -2327,7 +2329,8 @@ void CookieMonster::RunCookieChangedCallbacks(const CanonicalCookie& cookie,
CookieOptions opts;
opts.set_include_httponly();
- opts.set_include_same_site();
+ opts.set_same_site_cookie_mode(
+ CookieOptions::SameSiteCookieMode::INCLUDE_STRICT_AND_LAX);
// Note that the callbacks in hook_map_ are wrapped with RunAsync(), so they
// are guaranteed to not take long - they just post a RunAsync task back to
// the appropriate thread's message loop and return.
« no previous file with comments | « net/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698