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

Issue 1000103002: Add a method to override all the cookies in CookieMonster (Closed)

Created:
5 years, 9 months ago by droger
Modified:
5 years, 9 months ago
CC:
chromium-reviews, erikwright (departed), cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a method to override all the cookies in CookieMonster This method is required in order to upstream CookieStoreIOS. CookieStoreIOS can periodically synchronize the iOS system cookie store (NSHTTPCookieStorage) to CookieMonster. It is not possible to simply delete all the cookies and re-add the new version of the cookies, because this can lead to cookie loss if the application crashes right after deleting all cookies. For this reason, this CL introduces a new SetAllCookies method that computes the exact difference between the exiting cookies and the new cookies, and does only the minimum of operations needed.

Patch Set 1 : #

Total comments: 9

Patch Set 2 : Review comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+463 lines, -0 lines) Patch
M net/cookies/canonical_cookie.h View 1 1 chunk +12 lines, -0 lines 0 comments Download
M net/cookies/canonical_cookie.cc View 1 2 chunks +50 lines, -0 lines 0 comments Download
M net/cookies/canonical_cookie_unittest.cc View 1 1 chunk +63 lines, -0 lines 0 comments Download
M net/cookies/cookie_monster.h View 1 5 chunks +21 lines, -0 lines 0 comments Download
M net/cookies/cookie_monster.cc View 1 5 chunks +112 lines, -0 lines 0 comments Download
M net/cookies/cookie_monster_unittest.cc View 1 5 chunks +205 lines, -0 lines 2 comments Download

Messages

Total messages: 16 (5 generated)
droger
fyi: this code has been used in production on iOS for ~1 year. This CL ...
5 years, 9 months ago (2015-03-12 15:50:29 UTC) #4
erikwright (departed)
https://codereview.chromium.org/1000103002/diff/40001/net/cookies/cookie_monster.cc File net/cookies/cookie_monster.cc (right): https://codereview.chromium.org/1000103002/diff/40001/net/cookies/cookie_monster.cc#newcode2357 net/cookies/cookie_monster.cc:2357: // It is OK to call set_difference using PartialDiffCookieSorter ...
5 years, 9 months ago (2015-03-13 13:59:01 UTC) #5
erikwright (departed)
https://codereview.chromium.org/1000103002/diff/40001/net/cookies/cookie_monster.cc File net/cookies/cookie_monster.cc (right): https://codereview.chromium.org/1000103002/diff/40001/net/cookies/cookie_monster.cc#newcode2357 net/cookies/cookie_monster.cc:2357: // It is OK to call set_difference using PartialDiffCookieSorter ...
5 years, 9 months ago (2015-03-13 13:59:02 UTC) #6
droger
Thanks for the comments, this is interesting. It seems that at least the last access ...
5 years, 9 months ago (2015-03-13 15:10:47 UTC) #7
droger
I removed the specific treatment for creation time and last access time, as it seems ...
5 years, 9 months ago (2015-03-16 13:03:50 UTC) #9
erikwright (departed)
LGTM https://codereview.chromium.org/1000103002/diff/80001/net/cookies/cookie_monster_unittest.cc File net/cookies/cookie_monster_unittest.cc (right): https://codereview.chromium.org/1000103002/diff/80001/net/cookies/cookie_monster_unittest.cc#newcode2186 net/cookies/cookie_monster_unittest.cc:2186: // SetAllCookies must not flush. It should, presumably, ...
5 years, 9 months ago (2015-03-17 17:46:16 UTC) #10
droger
https://codereview.chromium.org/1000103002/diff/80001/net/cookies/cookie_monster_unittest.cc File net/cookies/cookie_monster_unittest.cc (right): https://codereview.chromium.org/1000103002/diff/80001/net/cookies/cookie_monster_unittest.cc#newcode2186 net/cookies/cookie_monster_unittest.cc:2186: // SetAllCookies must not flush. On 2015/03/17 17:46:16, erikwright ...
5 years, 9 months ago (2015-03-17 17:48:57 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1000103002/80001
5 years, 9 months ago (2015-03-17 18:10:13 UTC) #13
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/d5d1278c27a9964ace098aa3717a84a301bb19c7 Cr-Commit-Position: refs/heads/master@{#320954}
5 years, 9 months ago (2015-03-17 19:22:48 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:80001)
5 years, 9 months ago (2015-03-17 19:24:12 UTC) #15
commit-bot: I haz the power
5 years, 9 months ago (2015-03-17 19:26:37 UTC) #16
Message was sent while issue was closed.
Committed patchset #2 (id:80001)

Powered by Google App Engine
This is Rietveld 408576698