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

Issue 233353003: Only commit cookie changes in prerenders after a prerender is shown (Closed)

Created:
6 years, 8 months ago by tburkard
Modified:
6 years, 7 months ago
CC:
chromium-reviews, davidben+watch_chromium.org, cbentzel+watch_chromium.org, creis+watch_chromium.org, tburkard+watch_chromium.org, nasko+codewatch_chromium.org, jam, gavinp+prer_chromium.org, darin-cc_chromium.org, ajwong+watch_chromium.org, jochen (gone - plz use gerrit)
Visibility:
Public.

Description

Only commit cookie changes in prerenders after a prerender is shown Will create a PrerenderCookieStore for each prerender, retaining all cookie operations of a prerender until the prerender is shown to the user. Forces prerenders to be in a new render process by themselves for this to work. BUG=371003 R=creis@chromium.org, davidben@chromium.org, erikwright@chromium.org, jam@chromium.org, jochen@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269798

Patch Set 1 #

Patch Set 2 : fix compile errors, lint errors #

Patch Set 3 : fix compile error #

Patch Set 4 : fix bug in prerender_cookie_store #

Patch Set 5 : fix bug in prerender_cookie_store #

Patch Set 6 : #

Patch Set 7 : sync #

Total comments: 44

Patch Set 8 : fix unittests #

Patch Set 9 : incorporate erikwright's feedback and use better names for content changes #

Patch Set 10 : sync @265252 #

Total comments: 17

Patch Set 11 : fix browser_tests #

Patch Set 12 : davidben's feedback #

Total comments: 15

Patch Set 13 : fix android test #

Patch Set 14 : Incorporate all remaining outstanding comments from creis and davidben #

Patch Set 15 : Add browser tests, fix a bug in what was changed yesterday. #

Total comments: 22

Patch Set 16 : address creis comments #

Total comments: 37

Patch Set 17 : creis and davidben feedback #

Patch Set 18 : fix bug, improve prerender_browsertest #

Patch Set 19 : fix bug causing tests to fail #

Patch Set 20 : fix bug causing browser test to fail #

Total comments: 10

Patch Set 21 : davidben's feedback #

Total comments: 12

Patch Set 22 : erik's feedback #

Patch Set 23 : sync @269781 + 'autlock'->'autolock' from erik's comment that was not included before #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1143 lines, -29 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/prerender/ExternalPrerenderHandler.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderRequestTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +7 lines, -1 line 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +16 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 5 chunks +39 lines, -1 line 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/extensions/activity_log/activity_log_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/net/cookie_store_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +19 lines, -0 lines 0 comments Download
M chrome/browser/net/evicted_domain_cookie_counter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/net/evicted_domain_cookie_counter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/net/evicted_domain_cookie_counter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/prerender/external_prerender_handler_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/prerender/external_prerender_handler_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +11 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +119 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_contents.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/prerender/prerender_contents.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +24 lines, -3 lines 0 comments Download
A chrome/browser/prerender/prerender_cookie_store.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +164 lines, -0 lines 0 comments Download
A chrome/browser/prerender/prerender_cookie_store.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +241 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_final_status.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_final_status.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 6 chunks +37 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 9 chunks +71 lines, -4 lines 0 comments Download
M chrome/browser/prerender/prerender_tracker.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +36 lines, -1 line 0 comments Download
M chrome/browser/prerender/prerender_tracker.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +87 lines, -0 lines 0 comments Download
M chrome/browser/prerender/prerender_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 4 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/ui/search/instant_search_prerenderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/test/data/android/prerender/homepage.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 19 20 21 1 chunk +12 lines, -0 lines 0 comments Download
A chrome/test/data/prerender/prerender_cookie.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 20 1 chunk +41 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +6 lines, -4 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +5 lines, -1 line 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +4 lines, -0 lines 0 comments Download
M net/cookies/canonical_cookie.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +9 lines, -0 lines 0 comments Download
M net/cookies/canonical_cookie.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +16 lines, -0 lines 0 comments Download
M net/cookies/cookie_monster.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 5 chunks +20 lines, -4 lines 0 comments Download
M net/cookies/cookie_monster.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 6 chunks +61 lines, -2 lines 0 comments Download
M net/cookies/cookie_monster_store_test.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download
M net/cookies/cookie_monster_store_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
tburkard
First draft. I will add testing to this change, but if you could already start ...
6 years, 8 months ago (2014-04-10 15:03:13 UTC) #1
tburkard
(ping) Thanks. To unsubscribe from this group and stop receiving emails from it, send an ...
6 years, 8 months ago (2014-04-16 13:05:07 UTC) #2
erikwright (departed)
Overall, looks reasonable. There is a lot of code here, and it seems to handle ...
6 years, 8 months ago (2014-04-16 14:17:56 UTC) #3
erikwright (departed)
On 2014/04/16 14:17:56, erikwright wrote: > Overall, looks reasonable. > > There is a lot ...
6 years, 8 months ago (2014-04-16 14:18:38 UTC) #4
tburkard
Addressed all of Erik's feedback. Erik, I agree this is a big change, and splitting ...
6 years, 8 months ago (2014-04-22 12:20:59 UTC) #5
mmenke
I'm going to defer to David and Erik on this one - Erik knows cookies, ...
6 years, 8 months ago (2014-04-22 14:22:58 UTC) #6
davidben
Looks reasonable so far. Some initial comments below. Also try bots are unhappy about some ...
6 years, 8 months ago (2014-04-22 21:20:42 UTC) #7
tburkard
https://codereview.chromium.org/233353003/diff/180001/chrome/browser/net/cookie_store_util.cc File chrome/browser/net/cookie_store_util.cc (right): https://codereview.chromium.org/233353003/diff/180001/chrome/browser/net/cookie_store_util.cc#newcode52 chrome/browser/net/cookie_store_util.cc:52: } On 2014/04/22 21:20:43, David Benjamin wrote: > Nit: ...
6 years, 8 months ago (2014-04-23 14:52:54 UTC) #8
davidben
https://codereview.chromium.org/233353003/diff/180001/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): https://codereview.chromium.org/233353003/diff/180001/chrome/browser/prerender/prerender_contents.cc#newcode351 chrome/browser/prerender/prerender_contents.cc:351: FINAL_STATUS_COOKIE_CONFLICT)); On 2014/04/23 14:52:54, tburkard wrote: > On 2014/04/22 ...
6 years, 8 months ago (2014-04-23 23:58:24 UTC) #9
jochen (gone - plz use gerrit)
https://codereview.chromium.org/233353003/diff/220001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/233353003/diff/220001/content/public/browser/content_browser_client.h#newcode245 content/public/browser/content_browser_client.h:245: // existing renderer in an existing host. that's kinda ...
6 years, 8 months ago (2014-04-24 12:47:20 UTC) #10
jochen (gone - plz use gerrit)
what happens if you have e..g third-party cookies blocked, a page is prerenderer, you navigate ...
6 years, 8 months ago (2014-04-24 12:49:48 UTC) #11
tburkard
David, I will address your concerns later. Jochen, re: your third party cookie block issue, ...
6 years, 8 months ago (2014-04-24 13:03:59 UTC) #12
jochen (gone - plz use gerrit)
On 2014/04/24 13:03:59, tburkard wrote: > David, I will address your concerns later. > > ...
6 years, 8 months ago (2014-04-25 08:35:57 UTC) #13
tburkard
+ creis. Charlie, can you read the conversation with Jochen here, and review the change ...
6 years, 8 months ago (2014-04-25 10:41:32 UTC) #14
Charlie Reis
https://codereview.chromium.org/233353003/diff/220001/chrome/browser/chrome_content_browser_client.h File chrome/browser/chrome_content_browser_client.h (right): https://codereview.chromium.org/233353003/diff/220001/chrome/browser/chrome_content_browser_client.h#newcode314 chrome/browser/chrome_content_browser_client.h:314: prerender::PrerenderTracker* prerender_tracker_; Seems strange to be adding members to ...
6 years, 7 months ago (2014-04-25 23:40:28 UTC) #15
tburkard
Thanks, Charlie, just responded to your comments. It sounds like we are converging here, could ...
6 years, 7 months ago (2014-04-29 12:01:05 UTC) #16
Charlie Reis
Thanks. Sounds like there's a path forward. https://codereview.chromium.org/233353003/diff/220001/chrome/browser/chrome_content_browser_client.h File chrome/browser/chrome_content_browser_client.h (right): https://codereview.chromium.org/233353003/diff/220001/chrome/browser/chrome_content_browser_client.h#newcode314 chrome/browser/chrome_content_browser_client.h:314: prerender::PrerenderTracker* prerender_tracker_; ...
6 years, 7 months ago (2014-04-29 22:43:51 UTC) #17
jam
https://codereview.chromium.org/233353003/diff/220001/chrome/browser/chrome_content_browser_client.h File chrome/browser/chrome_content_browser_client.h (right): https://codereview.chromium.org/233353003/diff/220001/chrome/browser/chrome_content_browser_client.h#newcode314 chrome/browser/chrome_content_browser_client.h:314: prerender::PrerenderTracker* prerender_tracker_; On 2014/04/29 22:43:52, Charlie Reis wrote: > ...
6 years, 7 months ago (2014-04-29 22:55:18 UTC) #18
tburkard
All remaining comments should be addressed now, and all tests should pass now. The only ...
6 years, 7 months ago (2014-05-06 14:54:44 UTC) #19
tburkard
I'd like to still get this into M36 (ie commit it before Friday). I will ...
6 years, 7 months ago (2014-05-07 04:12:55 UTC) #20
jochen (gone - plz use gerrit)
On 2014/05/07 04:12:55, tburkard wrote: > I'd like to still get this into M36 (ie ...
6 years, 7 months ago (2014-05-07 06:24:01 UTC) #21
tburkard
On Wed, May 7, 2014 at 8:24 AM, <jochen@chromium.org> wrote: > On 2014/05/07 04:12:55, tburkard ...
6 years, 7 months ago (2014-05-07 08:35:49 UTC) #22
tburkard
Added browser tests for the new functionality, and fixed a bug in the change yesterday. ...
6 years, 7 months ago (2014-05-07 14:48:57 UTC) #23
Charlie Reis
Main remaining concerns: it looks like you're using prerender_tracker_ on both the UI thread and ...
6 years, 7 months ago (2014-05-07 17:21:31 UTC) #24
tburkard
Addressed all your concerns, Charlie. Added a bug number, and clarified that my use of ...
6 years, 7 months ago (2014-05-07 18:34:26 UTC) #25
tburkard
On Wed, May 7, 2014 at 7:21 PM, <creis@chromium.org> wrote: > Main remaining concerns: it ...
6 years, 7 months ago (2014-05-07 18:58:00 UTC) #26
tburkard
Thinking about this some more: So the member is initialized to NULL, and that happens ...
6 years, 7 months ago (2014-05-07 19:03:09 UTC) #27
jam
lgtm
6 years, 7 months ago (2014-05-07 19:45:07 UTC) #28
Charlie Reis
This sounds very subtle and potentially fragile to me. Looking closer at PrerenderTracker, it appears ...
6 years, 7 months ago (2014-05-07 19:46:40 UTC) #29
davidben
Still need to finish looking over the new version, but I wanted to publish the ...
6 years, 7 months ago (2014-05-07 19:56:59 UTC) #30
tburkard
On Wed, May 7, 2014 at 9:46 PM, <creis@chromium.org> wrote: > This sounds very subtle ...
6 years, 7 months ago (2014-05-07 20:02:28 UTC) #31
Charlie Reis
On 2014/05/07 20:02:28, tburkard wrote: > On Wed, May 7, 2014 at 9:46 PM, <mailto:creis@chromium.org> ...
6 years, 7 months ago (2014-05-07 20:30:35 UTC) #32
davidben
https://codereview.chromium.org/233353003/diff/290001/chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderRequestTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderRequestTest.java (right): https://codereview.chromium.org/233353003/diff/290001/chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderRequestTest.java#newcode41 chrome/android/javatests/src/org/chromium/chrome/browser/prerender/ExternalPrerenderRequestTest.java:41: launchChromeShellWithUrl(HOMEPAGE_URL); This seems a little bizarre. Does this mean ...
6 years, 7 months ago (2014-05-07 23:17:42 UTC) #33
jochen (gone - plz use gerrit)
I defer to Erik and Charlie for my parts, moving myself to cc
6 years, 7 months ago (2014-05-08 07:07:58 UTC) #34
tburkard
This should address all outstanding comments, except for David's browser_test related comments. I will address ...
6 years, 7 months ago (2014-05-08 10:59:53 UTC) #35
tburkard
Fixed another small bug in prerender_tracker in the change I added in the last iteration ...
6 years, 7 months ago (2014-05-08 12:49:33 UTC) #36
davidben
LGTM with comments. Thanks for the tests! https://codereview.chromium.org/233353003/diff/290001/chrome/browser/chrome_content_browser_client.h File chrome/browser/chrome_content_browser_client.h (right): https://codereview.chromium.org/233353003/diff/290001/chrome/browser/chrome_content_browser_client.h#newcode315 chrome/browser/chrome_content_browser_client.h:315: // It ...
6 years, 7 months ago (2014-05-08 21:26:24 UTC) #37
tburkard
Addressed all of David's most recent items. Once Erik is ok with this, I will ...
6 years, 7 months ago (2014-05-09 09:19:16 UTC) #38
davidben
https://codereview.chromium.org/233353003/diff/290001/chrome/browser/net/cookie_store_util.cc File chrome/browser/net/cookie_store_util.cc (right): https://codereview.chromium.org/233353003/diff/290001/chrome/browser/net/cookie_store_util.cc#newcode51 chrome/browser/net/cookie_store_util.cc:51: this, cookie, removed, cause)); On 2014/05/09 09:19:17, tburkard wrote: ...
6 years, 7 months ago (2014-05-09 15:56:47 UTC) #39
erikwright (departed)
LGTM. Please write a test for CopyCookiesToOtherCookieMonster in a follow-up. https://codereview.chromium.org/233353003/diff/390001/net/cookies/cookie_monster.cc File net/cookies/cookie_monster.cc (right): https://codereview.chromium.org/233353003/diff/390001/net/cookies/cookie_monster.cc#newcode1438 ...
6 years, 7 months ago (2014-05-12 14:27:48 UTC) #40
tburkard
https://codereview.chromium.org/233353003/diff/290001/chrome/browser/net/cookie_store_util.cc File chrome/browser/net/cookie_store_util.cc (right): https://codereview.chromium.org/233353003/diff/290001/chrome/browser/net/cookie_store_util.cc#newcode51 chrome/browser/net/cookie_store_util.cc:51: this, cookie, removed, cause)); I agree with you that ...
6 years, 7 months ago (2014-05-12 14:42:59 UTC) #41
tburkard
6 years, 7 months ago (2014-05-12 16:37:48 UTC) #42
Message was sent while issue was closed.
Committed patchset #23 manually as r269798 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698