Index: net/cookies/canonical_cookie.cc |
diff --git a/net/cookies/canonical_cookie.cc b/net/cookies/canonical_cookie.cc |
index fcc8e3d9f4a763ea45b77fdc76984ef986d1eabe..aef2e5ebea16176d2c52bcfba4d23ac0e64517f4 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() && |
mmenke
2015/10/16 17:29:26
Wait....We're more restrictive when options.includ
Mike West
2015/10/16 18:57:08
No? If `include_first_party_only` is set, we skip
mmenke
2015/10/16 19:02:09
Right...So "include_first_party_only()" is set, we
|
- options.first_party_url().GetOrigin() != url.GetOrigin()) { |
+ !options.first_party().IsSameOriginWith(url::Origin(url.GetOrigin()))) { |
mmenke
2015/10/16 17:29:26
I don't think GetOrigin() is needed here? It's no
Mike West
2015/10/16 18:57:08
Yeah. I should have dropped it.
|
return false; |
} |