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

Issue 2649083002: Divide CookieStoreIOS into two different classes with different backends (Closed)

Created:
3 years, 11 months ago by maksims (do not use this acc)
Modified:
3 years, 9 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, pkl (ping after 24h if needed), noyau+watch_chromium.org, marq+watch_chromium.org, sdefresne+watch_chromium.org, lilyhoughton
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Divide CookieStoreIOS into two different classes with different backends CookieStoreIOS is used as a synchronized object with NSHTTPCookieStorge, and CookieStoreIOSPersistent is a class that uses CookieMonster as it's backend. BUG=679736 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2649083002 Cr-Commit-Position: refs/heads/master@{#446966} Committed: https://chromium.googlesource.com/chromium/src/+/fdd9f091afe9235efdfc1c1fce584d560ab9523f

Patch Set 1 #

Total comments: 20

Patch Set 2 : Eugene's comments #

Total comments: 14

Patch Set 3 : nits #

Patch Set 4 : fix typo #

Patch Set 5 : rebase #

Total comments: 2

Patch Set 6 : rebased and added todo #

Patch Set 7 : fix compilation #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+442 lines, -315 lines) Patch
M components/cronet/ios/cronet_environment.mm View 1 chunk +3 lines, -3 lines 1 comment Download
M ios/chrome/browser/net/cookie_util.mm View 1 2 3 2 chunks +3 lines, -2 lines 0 comments Download
M ios/crnet/crnet_environment.mm View 1 chunk +1 line, -1 line 0 comments Download
M ios/net/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M ios/net/cookies/cookie_store_ios.h View 1 2 3 4 5 5 chunks +33 lines, -43 lines 0 comments Download
M ios/net/cookies/cookie_store_ios.mm View 1 2 3 4 5 6 18 chunks +155 lines, -252 lines 3 comments Download
A ios/net/cookies/cookie_store_ios_persistent.h View 1 2 3 4 5 6 1 chunk +89 lines, -0 lines 0 comments Download
A ios/net/cookies/cookie_store_ios_persistent.mm View 1 2 3 4 5 6 1 chunk +141 lines, -0 lines 0 comments Download
M ios/net/cookies/cookie_store_ios_unittest.mm View 1 2 3 4 5 6 chunks +11 lines, -10 lines 0 comments Download
M ios/web/shell/shell_url_request_context_getter.mm View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M ios/web_view/internal/criwv_url_request_context_getter.mm View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 68 (43 generated)
maksims (do not use this acc)
please take a look
3 years, 11 months ago (2017-01-23 12:43:41 UTC) #6
mmenke
On 2017/01/23 12:43:41, maksims wrote: > please take a look I'm happy to review this, ...
3 years, 11 months ago (2017-01-23 17:00:17 UTC) #7
Eugene But (OOO till 7-30)
Thank you for doing this! General direction lg. https://codereview.chromium.org/2649083002/diff/1/ios/net/cookies/cookie_store_ios.h File ios/net/cookies/cookie_store_ios.h (left): https://codereview.chromium.org/2649083002/diff/1/ios/net/cookies/cookie_store_ios.h#oldcode71 ios/net/cookies/cookie_store_ios.h:71: static ...
3 years, 11 months ago (2017-01-23 17:37:48 UTC) #8
maksims (do not use this acc)
https://codereview.chromium.org/2649083002/diff/1/ios/net/cookies/cookie_store_ios.h File ios/net/cookies/cookie_store_ios.h (left): https://codereview.chromium.org/2649083002/diff/1/ios/net/cookies/cookie_store_ios.h#oldcode71 ios/net/cookies/cookie_store_ios.h:71: static std::unique_ptr<CookieStoreIOS> CreateCookieStore( On 2017/01/23 17:37:47, Eugene But wrote: ...
3 years, 11 months ago (2017-01-24 10:23:46 UTC) #12
Eugene But (OOO till 7-30)
nit in CL description: s/Devide/Divide/ Thanks again! https://codereview.chromium.org/2649083002/diff/60001/ios/chrome/browser/net/cookie_util.mm File ios/chrome/browser/net/cookie_util.mm (right): https://codereview.chromium.org/2649083002/diff/60001/ios/chrome/browser/net/cookie_util.mm#newcode16 ios/chrome/browser/net/cookie_util.mm:16: #include "ios/net/cookies/cookie_store_ios.h" ...
3 years, 11 months ago (2017-01-24 22:31:30 UTC) #16
maksims (do not use this acc)
https://codereview.chromium.org/2649083002/diff/60001/ios/chrome/browser/net/cookie_util.mm File ios/chrome/browser/net/cookie_util.mm (right): https://codereview.chromium.org/2649083002/diff/60001/ios/chrome/browser/net/cookie_util.mm#newcode16 ios/chrome/browser/net/cookie_util.mm:16: #include "ios/net/cookies/cookie_store_ios.h" On 2017/01/24 22:31:30, Eugene But wrote: > ...
3 years, 10 months ago (2017-01-27 12:46:37 UTC) #35
mmenke
Think I'm just going to completely defer to Eugene on this one. I'll sign off ...
3 years, 10 months ago (2017-01-27 15:49:24 UTC) #36
Eugene But (OOO till 7-30)
lgtm and thank you fox doing this. I run internal tests with your changes and ...
3 years, 10 months ago (2017-01-27 19:30:06 UTC) #37
mmenke
LGTM
3 years, 10 months ago (2017-01-27 19:30:58 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2649083002/180001
3 years, 10 months ago (2017-01-30 07:33:14 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/144330) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 10 months ago (2017-01-30 07:39:45 UTC) #44
maksims (do not use this acc)
https://codereview.chromium.org/2649083002/diff/140001/ios/net/cookies/cookie_store_ios_persistent.h File ios/net/cookies/cookie_store_ios_persistent.h (right): https://codereview.chromium.org/2649083002/diff/140001/ios/net/cookies/cookie_store_ios_persistent.h#newcode26 ios/net/cookies/cookie_store_ios_persistent.h:26: class CookieStoreIOSPersistent : public CookieStoreIOS { On 2017/01/27 19:30:06, ...
3 years, 10 months ago (2017-01-30 10:37:13 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2649083002/200001
3 years, 10 months ago (2017-01-30 10:37:16 UTC) #52
commit-bot: I haz the power
Committed patchset #7 (id:200001) as https://chromium.googlesource.com/chromium/src/+/fdd9f091afe9235efdfc1c1fce584d560ab9523f
3 years, 10 months ago (2017-01-30 10:42:36 UTC) #55
mef
FYI, this broke Cronet. https://codereview.chromium.org/2649083002/diff/200001/components/cronet/ios/cronet_environment.mm File components/cronet/ios/cronet_environment.mm (right): https://codereview.chromium.org/2649083002/diff/200001/components/cronet/ios/cronet_environment.mm#newcode315 components/cronet/ios/cronet_environment.mm:315: base::MakeUnique<CookieStoreIOS>( This should've been net::CookieStoreIOS. ...
3 years, 10 months ago (2017-02-09 18:37:16 UTC) #57
Eugene But (OOO till 7-30)
https://codereview.chromium.org/2649083002/diff/200001/ios/net/cookies/cookie_store_ios.mm File ios/net/cookies/cookie_store_ios.mm (right): https://codereview.chromium.org/2649083002/diff/200001/ios/net/cookies/cookie_store_ios.mm#newcode328 ios/net/cookies/cookie_store_ios.mm:328: DCHECK(SystemCookiesAllowed()); On 2017/02/09 18:37:16, mef wrote: > This check ...
3 years, 10 months ago (2017-02-10 00:10:56 UTC) #58
maksims (do not use this acc)
On 2017/02/09 18:37:16, mef wrote: > FYI, this broke Cronet. > > https://codereview.chromium.org/2649083002/diff/200001/components/cronet/ios/cronet_environment.mm > File ...
3 years, 10 months ago (2017-02-10 13:02:25 UTC) #59
mef
Maksim, yes, I've got https://codereview.chromium.org/2684933009/ to fix this. https://codereview.chromium.org/2649083002/diff/200001/ios/net/cookies/cookie_store_ios.mm File ios/net/cookies/cookie_store_ios.mm (right): https://codereview.chromium.org/2649083002/diff/200001/ios/net/cookies/cookie_store_ios.mm#newcode328 ios/net/cookies/cookie_store_ios.mm:328: DCHECK(SystemCookiesAllowed()); ...
3 years, 10 months ago (2017-02-10 16:33:57 UTC) #60
Eugene But (OOO till 7-30)
On 2017/02/10 16:33:57, mef wrote: > Maksim, yes, I've got https://codereview.chromium.org/2684933009/ to fix this. > ...
3 years, 10 months ago (2017-02-10 18:33:53 UTC) #61
sdefresne
+droger who may still remember how cookie store works on iOS.
3 years, 10 months ago (2017-02-13 13:46:06 UTC) #63
droger
On 2017/02/13 13:46:06, sdefresne wrote: > +droger who may still remember how cookie store works ...
3 years, 10 months ago (2017-02-14 10:09:12 UTC) #64
Eugene But (OOO till 7-30)
On 2017/02/14 10:09:12, droger wrote: > On 2017/02/13 13:46:06, sdefresne wrote: > > +droger who ...
3 years, 10 months ago (2017-02-14 16:09:51 UTC) #65
mef
On 2017/02/14 16:09:51, Eugene But wrote: > On 2017/02/14 10:09:12, droger wrote: > > On ...
3 years, 10 months ago (2017-02-14 16:15:31 UTC) #66
Eugene But (OOO till 7-30)
On 2017/02/14 16:15:31, mef wrote: > On 2017/02/14 16:09:51, Eugene But wrote: > > On ...
3 years, 10 months ago (2017-02-14 16:22:30 UTC) #67
sdefresne
3 years, 10 months ago (2017-02-14 16:35:43 UTC) #68
Message was sent while issue was closed.
On 2017/02/14 16:22:30, Eugene But wrote:
> On 2017/02/14 16:15:31, mef wrote:
> > On 2017/02/14 16:09:51, Eugene But wrote:
> > > On 2017/02/14 10:09:12, droger wrote:
> > > > On 2017/02/13 13:46:06, sdefresne wrote:
> > > > > +droger who may still remember how cookie store works on iOS.
> > > > 
> > > > The code seems to have changed quite a bit since I worked on this, but
> from
> > my
> > > > understanding CookieStoreIOS is only used by CroNet, and CroNet
basically
> > only
> > > > needs the basic CookieStore functionality. 
> > > > 
> > > > We could probably get rid of cookie_monster_, FlushStore(), etc,.. as I
> > expect
> > > > they are never actually called, except when the system cookies are
> disabled
> > > > (they allow to still access a copy of the cookies even though the
cookies
> > are
> > > no
> > > > longer accessible in the system store), and I don't think this
> functionality
> > > is
> > > > needed by CroNet.
> > > CookieStoreIOS is also used for SignIn, but that code maintains the
original
> > > behavior and flushes cookies.
> > 
> > So, if an app uses Cronet for SignIn, should Cronet also flush cookies?
> Sorry, I don't know :(

SignIn is a ios/chrome level feature, so AFAICT, it cannot be used by Cronet.

Powered by Google App Engine
This is Rietveld 408576698