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

Unified Diff: net/cookies/canonical_cookie.cc

Issue 1413623002: Convert 'CookieOptions::first_party_url' to a 'url::Origin'. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 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 | « no previous file | net/cookies/canonical_cookie_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cookies/canonical_cookie.cc
diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc
index fcc8e3d9f4a763ea45b77fdc76984ef986d1eabe..a37944b4aa34d2c64415e8747285913fb11598f3 100644
--- a/net/cookies/canonical_cookie.cc
+++ b/net/cookies/canonical_cookie.cc
@@ -391,11 +391,12 @@ bool CanonicalCookie::IncludeForRequestURL(const GURL& url,
if (!IsOnPath(url.path()))
return false;
- // Include first-party-only cookies iff |options| tells us to include all of
- // them, or if a first-party URL is set and its origin matches the origin of
- // |url|.
+ // Include first-party-only cookies if:
+ //
+ // * |options| tells us to include all of them
+ // * a first-party origin is set, and they matches the origin of |url|
if (IsFirstPartyOnly() && !options.include_first_party_only() &&
- options.first_party_url().GetOrigin() != url.GetOrigin()) {
+ !options.first_party().IsSameOriginWith(url::Origin(url))) {
return false;
}
« no previous file with comments | « no previous file | net/cookies/canonical_cookie_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698