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

Issue 1773133002: SameSite: Implement 'Strict'/'Lax' attribute parsing. (Closed)

Created:
4 years, 9 months ago by Mike West
Modified:
4 years, 9 months ago
CC:
achuith+watch_chromium.org, cbentzel+watch_chromium.org, chromium-apps-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, davemoore+watch_chromium.org, dzhioev+watch_chromium.org, extensions-reviews_chromium.org, jam, markusheintz_, oshima+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

SameSite: Implement 'Strict'/'Lax' attribute parsing. https://tools.ietf.org/html/draft-west-first-party-cookies-06 introduced the notion of "Strict" or "Lax" enforcement of the "SameSite" attribute. This patch implements the infrastructure changes necessary to support that distinction, but does not yet implement the behavioral change (that is, after this patch, `SameSite` will be rejected, while `SameSite=Strict` and `SameSite=Lax` will have the same behavior that `SameSite` alone has today). Most of this patch is occupied with the fairly mechanical process of swapping out a new 'CookieSameSite' enum for the existing boolean in various constructors and setters. The most interesting piece is the change to the storage backend, which now stores 0, 1, or 2 in the database to represent the possible values, rather than 0 or 1 to represent the boolean. BUG=459154 Committed: https://crrev.com/e1a295845cbc338a564dc04e6e3e69b29ba7862f Cr-Commit-Position: refs/heads/master@{#381201}

Patch Set 1 #

Patch Set 2 : android #

Patch Set 3 : compile? #

Patch Set 4 : ios? #

Total comments: 31

Patch Set 5 : mmenke@ #

Patch Set 6 : bugs #

Total comments: 5

Patch Set 7 : mmenke@ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+467 lines, -302 lines) Patch
M android_webview/browser/net/aw_cookie_store_wrapper.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/net/aw_cookie_store_wrapper.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/android/cookies/cookies_fetcher.h View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/android/cookies/cookies_fetcher.cc View 1 2 3 4 5 4 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/browsing_data/cookies_tree_model.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/login/profile_auth_data.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/login/profile_auth_data_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/cookies/cookies_api.cc View 1 2 3 4 5 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/cookies/cookies_unittest.cc View 1 2 3 4 5 5 chunks +14 lines, -11 lines 0 comments Download
M components/signin/core/browser/gaia_cookie_manager_service.cc View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/net/quota_policy_cookie_store_unittest.cc View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M ios/net/cookies/cookie_cache_unittest.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M ios/net/cookies/cookie_store_ios.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ios/net/cookies/cookie_store_ios.mm View 1 2 1 chunk +1 line, -1 line 0 comments Download
M ios/net/cookies/cookie_store_ios_unittest.mm View 1 2 3 4 5 2 chunks +2 lines, -3 lines 0 comments Download
M ios/net/cookies/system_cookie_util.mm View 1 2 3 4 5 1 chunk +4 lines, -2 lines 0 comments Download
M ios/net/cookies/system_cookie_util_unittest.mm View 1 2 3 4 5 2 chunks +2 lines, -4 lines 0 comments Download
M net/cookies/canonical_cookie.h View 4 chunks +4 lines, -4 lines 0 comments Download
M net/cookies/canonical_cookie.cc View 1 2 3 4 5 chunks +11 lines, -5 lines 0 comments Download
M net/cookies/canonical_cookie_unittest.cc View 1 2 3 4 5 6 12 chunks +53 lines, -42 lines 0 comments Download
M net/cookies/cookie_constants.h View 1 2 3 4 5 1 chunk +15 lines, -1 line 0 comments Download
M net/cookies/cookie_constants.cc View 1 2 3 4 5 3 chunks +15 lines, -2 lines 0 comments Download
M net/cookies/cookie_monster.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M net/cookies/cookie_monster.cc View 1 2 3 4 5 chunks +7 lines, -5 lines 0 comments Download
M net/cookies/cookie_monster_store_test.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M net/cookies/cookie_monster_unittest.cc View 1 2 3 4 5 12 chunks +103 lines, -123 lines 0 comments Download
M net/cookies/cookie_store.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M net/cookies/cookie_store_test_helpers.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M net/cookies/cookie_store_test_helpers.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M net/cookies/cookie_store_unittest.h View 1 2 3 4 5 2 chunks +17 lines, -17 lines 0 comments Download
M net/cookies/parsed_cookie.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
M net/cookies/parsed_cookie.cc View 1 2 3 4 5 3 chunks +9 lines, -4 lines 0 comments Download
M net/cookies/parsed_cookie_unittest.cc View 1 2 3 4 5 6 11 chunks +47 lines, -12 lines 0 comments Download
M net/extras/sqlite/sqlite_persistent_cookie_store.cc View 1 2 3 4 5 4 chunks +42 lines, -4 lines 0 comments Download
M net/extras/sqlite/sqlite_persistent_cookie_store_perftest.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc View 1 2 3 4 5 7 chunks +80 lines, -22 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download

Dependent Patchsets:

Messages

Total messages: 24 (9 generated)
Mike West
We have too many platforms. :( Assuming I can make ChromeOS, Android, and iOS compile, ...
4 years, 9 months ago (2016-03-08 16:35:14 UTC) #2
Mike West
marq@: Would you mind stamping the trivial changes to //ios? torne@: Would you mind stamping ...
4 years, 9 months ago (2016-03-10 13:56:49 UTC) #5
Torne
android_webview LGTM
4 years, 9 months ago (2016-03-10 14:09:28 UTC) #6
jochen (gone - plz use gerrit)
lgtm
4 years, 9 months ago (2016-03-10 15:53:24 UTC) #8
mmenke
Just looked at net/ https://codereview.chromium.org/1773133002/diff/80001/net/cookies/canonical_cookie.cc File net/cookies/canonical_cookie.cc (right): https://codereview.chromium.org/1773133002/diff/80001/net/cookies/canonical_cookie.cc#newcode425 net/cookies/canonical_cookie.cc:425: if (SameSite() && !options.include_same_site()) Should ...
4 years, 9 months ago (2016-03-11 18:08:31 UTC) #9
mmenke
https://codereview.chromium.org/1773133002/diff/80001/net/cookies/parsed_cookie.h File net/cookies/parsed_cookie.h (right): https://codereview.chromium.org/1773133002/diff/80001/net/cookies/parsed_cookie.h#newcode53 net/cookies/parsed_cookie.h:53: bool HasSameSite() const { return same_site_index_ != 0; } ...
4 years, 9 months ago (2016-03-11 18:09:07 UTC) #10
marq (ping after 24h)
ios/net LGTM
4 years, 9 months ago (2016-03-11 21:38:25 UTC) #11
Mike West
Thanks, all! mmenke@: I believe that latest patchset addresses your feedback. Mind taking another look? ...
4 years, 9 months ago (2016-03-14 10:18:54 UTC) #12
Mike West
https://codereview.chromium.org/1773133002/diff/160001/net/cookies/cookie_constants.h File net/cookies/cookie_constants.h (right): https://codereview.chromium.org/1773133002/diff/160001/net/cookies/cookie_constants.h#newcode24 net/cookies/cookie_constants.h:24: STRICT_MODE = 2, Windows has a "STRICT" macro. So.. ...
4 years, 9 months ago (2016-03-14 15:15:08 UTC) #15
mmenke
On 2016/03/14 15:15:08, Mike West wrote: > https://codereview.chromium.org/1773133002/diff/160001/net/cookies/cookie_constants.h > File net/cookies/cookie_constants.h (right): > > https://codereview.chromium.org/1773133002/diff/160001/net/cookies/cookie_constants.h#newcode24 ...
4 years, 9 months ago (2016-03-14 16:25:05 UTC) #16
mmenke
LGTM https://codereview.chromium.org/1773133002/diff/80001/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc File net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc (right): https://codereview.chromium.org/1773133002/diff/80001/net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc#newcode644 net/extras/sqlite/sqlite_persistent_cookie_store_unittest.cc:644: // Put the cookies into a map, by ...
4 years, 9 months ago (2016-03-14 20:14:50 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1773133002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1773133002/180001
4 years, 9 months ago (2016-03-15 08:35:28 UTC) #20
Mike West
Thanks! https://codereview.chromium.org/1773133002/diff/160001/net/cookies/canonical_cookie_unittest.cc File net/cookies/canonical_cookie_unittest.cc (right): https://codereview.chromium.org/1773133002/diff/160001/net/cookies/canonical_cookie_unittest.cc#newcode89 net/cookies/canonical_cookie_unittest.cc:89: cookie = CanonicalCookie::Create(url, "A=2; SameSite=Strict", creation_time, On 2016/03/14 ...
4 years, 9 months ago (2016-03-15 09:41:11 UTC) #21
commit-bot: I haz the power
Committed patchset #7 (id:180001)
4 years, 9 months ago (2016-03-15 10:08:02 UTC) #22
commit-bot: I haz the power
4 years, 9 months ago (2016-03-15 10:09:38 UTC) #24
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e1a295845cbc338a564dc04e6e3e69b29ba7862f
Cr-Commit-Position: refs/heads/master@{#381201}

Powered by Google App Engine
This is Rietveld 408576698