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

Issue 9416031: Prerendered pages are swapped in at browser::Navigate time. (Closed)

Created:
8 years, 10 months ago by cbentzel
Modified:
8 years, 9 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Prerendered pages are swapped in at browser::Navigate time. They used to get swapped in by observing provisional loads. This is being changed to Navigate so renderer-issued navigations into a prerender can be handled with the same mechanism that is used to handle renderer-issued navigations which need to cross process boundaries, such as clicking into a hosted app. For browser issued navigations, this means that we will immediately swap in the prerender, instead of sending a Navigate message to the render view and swapping in on the provisional load statement. For renderer issued navigations, decidePolicyForNavigation will ultimately cancel the navigation in the renderer and send an OpenURL up to the browser process. In order to make the renderer know that a navigation could be prerendered, a set of prerendered URLs need to be sent to a render process. BUG=104493 TEST=Existing browser tests, manual tests that omnibox prerenders work.

Patch Set 1 #

Patch Set 2 : Mostly works #

Patch Set 3 : All browser tests pass #

Patch Set 4 : Bring back NOTREACHED #

Patch Set 5 : Browser-navigated and render-navigated prerenders work #

Patch Set 6 : Some cleanup #

Patch Set 7 : More cleanup #

Total comments: 24

Patch Set 8 : Respond to dominich's review #

Patch Set 9 : Limit to origin process #

Total comments: 11

Patch Set 10 : More cleanup #

Patch Set 11 : Remove TODO #

Total comments: 1

Patch Set 12 : Merged #

Patch Set 13 : Clang fixes #

Patch Set 14 : Forward declare GURL #

Patch Set 15 : Include gurl.h #

Patch Set 16 : Fix unit tests #

Total comments: 9

Patch Set 17 : Opener #

Patch Set 18 : File ordering in tab_contents.cc #

Patch Set 19 : Add newline #

Patch Set 20 : Render thread never starts in some tests #

Patch Set 21 : Merge #

Patch Set 22 : Merge #

Patch Set 23 : Fix merge issue #

Patch Set 24 : Send redirected URLs to render process. #

Patch Set 25 : Base files missing #

Total comments: 2

Patch Set 26 : Fix NetInternalsTest #

Patch Set 27 : Base files missing #

Patch Set 28 : Base files missing #

Patch Set 29 : Base files missing #

Patch Set 30 : Base files missing #

Patch Set 31 : Base files missing #

Patch Set 32 : Base files missing #

Patch Set 33 : Rebase #

Patch Set 34 : Base files missing #

Patch Set 35 : Base files missing #

Patch Set 36 : Base files missing #

Patch Set 37 : Base files missing #

Patch Set 38 : Base files missing #

Patch Set 39 : Base files missing #

Patch Set 40 : Compile fix #

Patch Set 41 : Disabled download_base, hopefully get the right base file #

Patch Set 42 : Disabled download_base, hopefully get the right base file #

Patch Set 43 : Disabled download_base, hopefully get the right base file #

Patch Set 44 : Disabled download_base, hopefully get the right base file #

Patch Set 45 : Disabled download_base, hopefully get the right base file #

Patch Set 46 : Disabled download_base, hopefully get the right base file #

Patch Set 47 : Disabled download_base, hopefully get the right base file #

Patch Set 48 : Disabled download_base, hopefully get the right base file #

Patch Set 49 : F #

Patch Set 50 : F #

Patch Set 51 : F #

Patch Set 52 : U #

Patch Set 53 : U #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -83 lines) Patch
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 23 24 25 26 27 28 29 30 31 32 7 chunks +58 lines, -16 lines 0 comments Download
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 23 24 25 26 27 28 29 30 31 32 1 chunk +3 lines, -0 lines 0 comments Download
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 23 24 25 26 27 28 29 30 31 32 7 chunks +42 lines, -4 lines 0 comments Download
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 23 24 25 26 27 28 29 30 31 32 1 chunk +4 lines, -8 lines 0 comments Download
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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 4 chunks +7 lines, -10 lines 0 comments Download
chrome/browser/prerender/prerender_manager_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 23 24 25 26 27 28 29 30 31 32 1 chunk +1 line, -7 lines 0 comments Download
chrome/browser/prerender/prerender_tab_helper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +0 lines, -6 lines 0 comments Download
chrome/browser/prerender/prerender_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 2 chunks +0 lines, -14 lines 0 comments Download
chrome/browser/ui/browser_navigator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 3 chunks +17 lines, -0 lines 0 comments Download
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 23 24 25 26 27 28 29 30 31 32 1 chunk +2 lines, -0 lines 0 comments Download
chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +2 lines, -0 lines 0 comments Download
chrome/common/common_message_generator.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
chrome/common/prerender_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +25 lines, -0 lines 0 comments Download
chrome/common/render_messages.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -6 lines 0 comments Download
chrome/renderer/chrome_content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +12 lines, -0 lines 0 comments Download
chrome/renderer/chrome_render_view_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +2 lines, -1 line 0 comments Download
chrome/renderer/plugins/plugin_placeholder.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -1 line 0 comments Download
chrome/renderer/prerender/prerender_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +41 lines, -0 lines 0 comments Download
chrome/renderer/prerender/prerender_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +60 lines, -0 lines 0 comments Download
chrome/renderer/prerender/prerender_helper.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
chrome/renderer/prerender/prerender_webmediaplayer.cc View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
chrome/test/data/prerender/prerender_loader.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +3 lines, -3 lines 0 comments Download
chrome/test/data/prerender/prerender_loader_with_session_storage.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
chrome/test/data/prerender/prerender_loader_with_unload.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -1 line 0 comments Download
content/browser/tab_contents/tab_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 23 24 25 26 27 28 29 30 31 32 3 chunks +8 lines, -0 lines 0 comments Download
content/browser/tab_contents/tab_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 23 24 25 26 27 28 29 30 31 32 2 chunks +6 lines, -1 line 0 comments Download
content/browser/tab_contents/tab_contents_view_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +1 line, -0 lines 0 comments Download
content/public/browser/web_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 23 24 25 26 27 28 29 30 31 32 1 chunk +3 lines, -0 lines 0 comments Download
ipc/ipc_message_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
cbentzel
This isn't fully ready to go - I need a tiny bit more nit cleanup, ...
8 years, 10 months ago (2012-02-24 22:59:13 UTC) #1
dominich
Generally looks good. http://codereview.chromium.org/9416031/diff/11022/chrome/browser/prerender/prerender_browsertest.cc File chrome/browser/prerender/prerender_browsertest.cc (right): http://codereview.chromium.org/9416031/diff/11022/chrome/browser/prerender/prerender_browsertest.cc#newcode175 chrome/browser/prerender/prerender_browsertest.cc:175: // synchronously on a Navigation. Is ...
8 years, 9 months ago (2012-02-28 16:21:00 UTC) #2
cbentzel
Thanks for the review. The latest patchset restricts the AddPrerender/RemovePrerender to the render process which ...
8 years, 9 months ago (2012-02-29 18:16:13 UTC) #3
dominich
http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc#newcode70 chrome/browser/prerender/prerender_contents.cc:70: // for the same URL in another page will ...
8 years, 9 months ago (2012-02-29 18:32:00 UTC) #4
cbentzel
OK, now I will actually rebase :) http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc#newcode70 chrome/browser/prerender/prerender_contents.cc:70: // for ...
8 years, 9 months ago (2012-02-29 19:22:34 UTC) #5
dominich
http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc#newcode71 chrome/browser/prerender/prerender_contents.cc:71: void InformRenderProcessAboutPrerender(const GURL& url, On 2012/02/29 19:22:36, cbentzel wrote: ...
8 years, 9 months ago (2012-02-29 19:44:35 UTC) #6
cbentzel
http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc#newcode71 chrome/browser/prerender/prerender_contents.cc:71: void InformRenderProcessAboutPrerender(const GURL& url, On 2012/02/29 19:44:35, dominich wrote: ...
8 years, 9 months ago (2012-02-29 19:50:10 UTC) #7
cbentzel
On Wed, Feb 29, 2012 at 2:50 PM, <cbentzel@chromium.org> wrote: > > http://codereview.chromium.**org/9416031/diff/25001/chrome/** > browser/prerender/prerender_**contents.cc<http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc> ...
8 years, 9 months ago (2012-02-29 19:50:40 UTC) #8
cbentzel
On 2012/02/29 19:50:10, cbentzel wrote: > http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc > File chrome/browser/prerender/prerender_contents.cc (right): > > http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc#newcode71 > ...
8 years, 9 months ago (2012-02-29 19:52:00 UTC) #9
dominich
On 2012/02/29 19:52:00, cbentzel wrote: > On 2012/02/29 19:50:10, cbentzel wrote: > > > http://codereview.chromium.org/9416031/diff/25001/chrome/browser/prerender/prerender_contents.cc ...
8 years, 9 months ago (2012-02-29 20:10:42 UTC) #10
cbentzel
jam: Could you review the non-prerender code? This touches IPC, chrome/renderer/chrome_content_renderer_client, and some other portions.
8 years, 9 months ago (2012-02-29 21:34:29 UTC) #11
cbentzel
jam: Could you review the non-prerender code? creis: This is an FYI but appreciate any ...
8 years, 9 months ago (2012-02-29 21:36:48 UTC) #12
cbentzel
+jcivelli - this changes the mechanism for when prerenders get swapped in, but should not ...
8 years, 9 months ago (2012-02-29 21:38:28 UTC) #13
jam
On 2012/02/29 21:36:48, cbentzel wrote: > jam: Could you review the non-prerender code? > > ...
8 years, 9 months ago (2012-03-01 01:05:25 UTC) #14
tburkard
LGTM On Wed, Feb 29, 2012 at 5:05 PM, <jam@chromium.org> wrote: > On 2012/02/29 21:36:48, ...
8 years, 9 months ago (2012-03-01 01:38:22 UTC) #15
Charlie Reis
Yes, this seems reasonable to me. A few notes and one question about opener_origin_ below. ...
8 years, 9 months ago (2012-03-01 19:06:03 UTC) #16
cbentzel
Thanks for the review Charlie - particular the part about the opener. http://codereview.chromium.org/9416031/diff/44004/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc ...
8 years, 9 months ago (2012-03-01 22:18:53 UTC) #17
Charlie Reis
http://codereview.chromium.org/9416031/diff/44004/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): http://codereview.chromium.org/9416031/diff/44004/chrome/browser/prerender/prerender_contents.cc#newcode83 chrome/browser/prerender/prerender_contents.cc:83: message = new PrerenderMsg_RemovePrerenderURL(url); On 2012/03/01 22:18:53, cbentzel wrote: ...
8 years, 9 months ago (2012-03-01 22:24:38 UTC) #18
cbentzel
On Thu, Mar 1, 2012 at 5:24 PM, <creis@chromium.org> wrote: > > http://codereview.chromium.**org/9416031/diff/44004/chrome/** > browser/prerender/prerender_**contents.cc<http://codereview.chromium.org/9416031/diff/44004/chrome/browser/prerender/prerender_contents.cc> ...
8 years, 9 months ago (2012-03-01 22:38:22 UTC) #19
cbentzel
I changed this to just record that a window.opener was set at all, rather than ...
8 years, 9 months ago (2012-03-05 15:38:57 UTC) #20
dominich
lgtm
8 years, 9 months ago (2012-03-05 15:55:29 UTC) #21
cbentzel
John - latest patches make a slight change to the WebContents API. Charlie - how ...
8 years, 9 months ago (2012-03-05 17:03:17 UTC) #22
Charlie Reis
On 2012/03/05 17:03:17, cbentzel wrote: > John - latest patches make a slight change to ...
8 years, 9 months ago (2012-03-05 17:27:04 UTC) #23
jam
On 2012/03/05 17:03:17, cbentzel wrote: > John - latest patches make a slight change to ...
8 years, 9 months ago (2012-03-06 15:53:40 UTC) #24
cbentzel
Dominic + Timo: you may want to look at patches after 23. This broke prerender ...
8 years, 9 months ago (2012-03-06 19:33:40 UTC) #25
dominich
still LGTM - just want to check if there's a better way to handle passing ...
8 years, 9 months ago (2012-03-06 19:41:39 UTC) #26
cbentzel
http://codereview.chromium.org/9416031/diff/62015/chrome/browser/prerender/prerender_contents.cc File chrome/browser/prerender/prerender_contents.cc (right): http://codereview.chromium.org/9416031/diff/62015/chrome/browser/prerender/prerender_contents.cc#newcode399 chrome/browser/prerender/prerender_contents.cc:399: InformRenderProcessAboutPrerender(*it, false, creator_child_id_); On 2012/03/06 19:41:39, dominich wrote: > ...
8 years, 9 months ago (2012-03-06 19:45:27 UTC) #27
cbentzel
Matt - can you review the net_internals_test change? You may want to look at the ...
8 years, 9 months ago (2012-03-06 22:26:01 UTC) #28
mmenke
On 2012/03/06 22:26:01, cbentzel wrote: > Matt - can you review the net_internals_test change? You ...
8 years, 9 months ago (2012-03-06 22:36:31 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cbentzel@chromium.org/9416031/71032
8 years, 9 months ago (2012-03-07 21:33:01 UTC) #30
commit-bot: I haz the power
Can't process patch for file chrome/renderer/chrome_content_renderer_client.cc. File's status is None, patchset upload is incomplete.
8 years, 9 months ago (2012-03-07 21:33:07 UTC) #31
cbentzel
Everyone - I'm going to have to move this over to a different CL issue ...
8 years, 9 months ago (2012-03-07 22:27:08 UTC) #32
cbentzel
8 years, 9 months ago (2012-03-07 22:29:02 UTC) #33

Powered by Google App Engine
This is Rietveld 408576698