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

Issue 23455047: InstantExtended: Send search URLs to renderers. (Closed)

Created:
7 years, 3 months ago by Jered
Modified:
7 years, 2 months ago
CC:
chromium-reviews, skanuj+watch_chromium.org, tburkard+watch_chromium.org, dhollowa+watch_chromium.org, dougw+watch_chromium.org, mad+watch_chromium.org, dominich, cbentzel+watch_chromium.org, melevin+watch_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, pedrosimonetti+watch_chromium.org, dbeam+watch-ntp_chromium.org, gavinp+prer_chromium.org, jfweitz+watch_chromium.org, kmadhusu+watch_chromium.org, donnd+watch_chromium.org, dominich+watch_chromium.org, David Black, samarth+watch_chromium.org, estade+watch_chromium.org, DO NOT USE (jschuh), Roger Tawa OOO till Jul 10th, tim (not reviewing)
Visibility:
Public.

Description

InstantExtended: Send search URLs to renderers. Previously, navigations initiated by an instant renderer were bounced to the browser to be rebucketed into an instant or non-instant renderer. But navigations from non-instant renderers to instant URLs (i.e. privileged search page URLs) were not rebucketed, because the renderer had no knowledge of which URLs were instant URLs, and it would be too expensive to bounce ALL URLs. As a result, non-instant pages like google.com/setprefs could not redirect to instant pages like google.com/search. This change has InstantService tell renderers about URLs associated with the default search engine, and uses this knowledge to bounce renderer-initiated navigations to likely instant URLs from non-instant processes back into the browser for rebucketing. So now link clicks from non-instant pages to instant pages will put the destination pages into an instant process. Unfortunately, though, redirects are still broken. For example, 0. User clicks "Set preferences" button on an instant page. 1. Instant renderer bounces google.com/setprefs to the browser. 2. Browser says google.com/setprefs is not an instant URL, and assigns it to a non-instant renderer. 3. After rebucketing to the non-instant renderer, google.com/setprefs is marked as a browser initiated request(!) 4. /setprefs redirects to /search, which _is_ an instant URL, but because /setprefs is marked as browser initiated the non-instant renderer does not get a chance to bounce it back to the browser. I tried working around this by giving redirects a chance to bounce back to the browser in step #4, but this broke the signin process model in a scary way that I don't fully understand. It seems like the right fix here is going to need to EITHER follow the redirect chain in step #2 when determining if an URL is an instant URL, OR somehow flag the bounced redirect request for further inspection in step #3. This change also includes a small side benefit. Since renderers now know about instant URLs, we can suppress a flash of a baked-in error page in the event of an error while loading the InstantExtended new tab page. TEST=manual,unit,browsertest BUG=271088, 223754 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=226103

Patch Set 1 : Missing files. #

Total comments: 3

Patch Set 2 : Rebase. #

Patch Set 3 : Address comment. #

Patch Set 4 : Nits #

Patch Set 5 : Small test #

Total comments: 2

Patch Set 6 : More unit tests #

Patch Set 7 : content browsertest #

Patch Set 8 : Add browsertest #

Patch Set 9 : Rebase #

Patch Set 10 : Also allow fork for redirect #

Patch Set 11 : Handle TemplateURL change #

Total comments: 12

Patch Set 12 : Rebase #

Patch Set 13 : Test ALL the things! #

Patch Set 14 : Rebase #

Total comments: 6

Patch Set 15 : Address comments #

Patch Set 16 : Address comments #

Patch Set 17 : Fix a bunch of broken tests #

Patch Set 18 : Give up on is_redirect. #

Patch Set 19 : More browsertest fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+616 lines, -89 lines) Patch
M chrome/browser/chrome_content_browser_client_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +15 lines, -1 line 0 comments Download
M chrome/browser/search/instant_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +9 lines, -0 lines 0 comments Download
M chrome/browser/search/instant_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +29 lines, -14 lines 0 comments Download
M chrome/browser/search/instant_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +33 lines, -7 lines 0 comments Download
M chrome/browser/search/instant_unittest_base.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/search/search.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +3 lines, -4 lines 0 comments Download
M chrome/browser/search/search.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 10 chunks +39 lines, -34 lines 0 comments Download
M chrome/browser/search/search_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser_instant_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +5 lines, -3 lines 0 comments Download
M chrome/browser/ui/search/instant_controller.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/search/instant_ntp_prerenderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/webui/ntp/ntp_user_data_logger.cc View 2 chunks +2 lines, -1 line 0 comments Download
M chrome/chrome_common.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +6 lines, -0 lines 0 comments Download
A chrome/common/search_urls.h View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A chrome/common/search_urls.cc View 1 2 3 1 chunk +26 lines, -0 lines 0 comments Download
A chrome/common/search_urls_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +40 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 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 5 chunks +25 lines, -9 lines 0 comments Download
A chrome/renderer/chrome_content_renderer_client_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +50 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +12 lines, -0 lines 0 comments Download
M chrome/renderer/media/webrtc_logging_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +15 lines, -12 lines 0 comments Download
A chrome/renderer/searchbox/search_bouncer.h View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/renderer/searchbox/search_bouncer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +49 lines, -0 lines 0 comments Download
A chrome/renderer/searchbox/search_bouncer_unittest.cc View 1 2 3 4 5 6 1 chunk +48 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/renderer/content_renderer_client.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M content/public/test/mock_render_thread.h View 1 2 3 4 5 6 7 3 chunks +7 lines, -0 lines 0 comments Download
M content/public/test/mock_render_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +17 lines, -1 line 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +76 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +9 lines, -1 line 0 comments Download

Messages

Total messages: 36 (0 generated)
Jered
samarth -> search creis -> content palmer,jschuh -> ipcs, security jhawkins -> chrome/renderer and webui
7 years, 3 months ago (2013-09-12 22:34:39 UTC) #1
Charlie Reis
I know there was a lot of discussion about this behavior on http://crbug.com/223754, so we ...
7 years, 3 months ago (2013-09-13 22:33:17 UTC) #2
Jered
On 2013/09/13 22:33:17, creis wrote: > I know there was a lot of discussion about ...
7 years, 3 months ago (2013-09-13 22:48:24 UTC) #3
Charlie Reis
On 2013/09/13 22:48:24, Jered wrote: > On 2013/09/13 22:33:17, creis wrote: > > I know ...
7 years, 3 months ago (2013-09-13 22:58:09 UTC) #4
Jered
https://codereview.chromium.org/23455047/diff/4001/content/renderer/render_view_impl.cc File content/renderer/render_view_impl.cc (right): https://codereview.chromium.org/23455047/diff/4001/content/renderer/render_view_impl.cc#newcode3696 content/renderer/render_view_impl.cc:3696: if (GetContentClient()->renderer()->ShouldSuppressErrorPage( On 2013/09/13 22:58:09, creis wrote: > > ...
7 years, 3 months ago (2013-09-16 22:30:46 UTC) #5
samarth
Overall this looks good to me. I just tried it out and it seems to ...
7 years, 3 months ago (2013-09-17 20:50:59 UTC) #6
Jered
PTAL, I added a lot of tests. It was a little unclear how to test ...
7 years, 3 months ago (2013-09-17 23:31:02 UTC) #7
Charlie Reis
Looks like lazyboy's https://chromiumcodereview.appspot.com/23856006/ is about to land and conflict with your RenderViewImpl change. I ...
7 years, 3 months ago (2013-09-18 02:11:07 UTC) #8
lazyboy
On 2013/09/18 02:11:07, creis wrote: > Looks like lazyboy's https://chromiumcodereview.appspot.com/23856006/ is about > to land ...
7 years, 3 months ago (2013-09-18 08:00:17 UTC) #9
jam
content lgtm
7 years, 3 months ago (2013-09-18 16:02:12 UTC) #10
Charlie Reis
On 2013/09/18 08:00:17, lazyboy wrote: > On 2013/09/18 02:11:07, creis wrote: > > Looks like ...
7 years, 3 months ago (2013-09-18 16:18:17 UTC) #11
Jered
PTAL jam/creis, it turns out that for ShouldFork() to work here, we need to allow ...
7 years, 3 months ago (2013-09-18 21:10:09 UTC) #12
Jered
PTAL samarth, handled TemplateURL changes. On 2013/09/17 20:50:59, samarth wrote: > Overall this looks good ...
7 years, 3 months ago (2013-09-18 21:34:52 UTC) #13
Jered
https://codereview.chromium.org/23455047/diff/18001/chrome/browser/search/instant_service.cc File chrome/browser/search/instant_service.cc (right): https://codereview.chromium.org/23455047/diff/18001/chrome/browser/search/instant_service.cc#newcode260 chrome/browser/search/instant_service.cc:260: rph->Send(new ChromeViewMsg_SetSearchURLs( On 2013/09/17 20:51:00, samarth wrote: > You ...
7 years, 3 months ago (2013-09-18 21:35:05 UTC) #14
Charlie Reis
On 2013/09/18 21:10:09, Jered wrote: > PTAL jam/creis, it turns out that for ShouldFork() to ...
7 years, 3 months ago (2013-09-18 22:05:23 UTC) #15
Jered
On 2013/09/18 22:05:23, creis wrote: > On 2013/09/18 21:10:09, Jered wrote: > > PTAL jam/creis, ...
7 years, 3 months ago (2013-09-18 22:59:08 UTC) #16
Charlie Reis
On 2013/09/18 22:59:08, Jered wrote: > On 2013/09/18 22:05:23, creis wrote: > > On 2013/09/18 ...
7 years, 3 months ago (2013-09-20 00:18:42 UTC) #17
samarth
Looks good for search. Just a couple of nits and requests for tests. Thanks, Samarth ...
7 years, 3 months ago (2013-09-20 16:43:39 UTC) #18
Jered
palmer/jschuh, do either of you want to look at this patch? We went back and ...
7 years, 3 months ago (2013-09-20 20:55:48 UTC) #19
samarth
lgtm
7 years, 3 months ago (2013-09-20 20:58:28 UTC) #20
Jered
jhawkins PTAL at chrome/renderer miscellany and webui
7 years, 3 months ago (2013-09-20 20:58:38 UTC) #21
Jered
jhawkins ping? palmer+jschuh to CC.
7 years, 3 months ago (2013-09-23 22:06:01 UTC) #22
Jered
+sky -> can you PTAL at some renderer* miscellany which has been OK'd for content, ...
7 years, 2 months ago (2013-09-25 18:25:00 UTC) #23
Tom Sepez
Messages LGTM.
7 years, 2 months ago (2013-09-25 18:37:32 UTC) #24
sky
https://codereview.chromium.org/23455047/diff/62001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/23455047/diff/62001/chrome/renderer/chrome_content_renderer_client.cc#newcode236 chrome/renderer/chrome_content_renderer_client.cc:236: if (!extension_dispatcher_) Why the ifs here and 244? https://codereview.chromium.org/23455047/diff/62001/chrome/renderer/chrome_content_renderer_client_browsertest.cc ...
7 years, 2 months ago (2013-09-25 20:43:16 UTC) #25
Jered
Thanks for the quick reviews https://codereview.chromium.org/23455047/diff/62001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/23455047/diff/62001/chrome/renderer/chrome_content_renderer_client.cc#newcode236 chrome/renderer/chrome_content_renderer_client.cc:236: if (!extension_dispatcher_) On 2013/09/25 ...
7 years, 2 months ago (2013-09-25 22:23:37 UTC) #26
sky
LGTM
7 years, 2 months ago (2013-09-25 22:34:09 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jered@chromium.org/23455047/72001
7 years, 2 months ago (2013-09-25 22:35:25 UTC) #28
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 2 months ago (2013-09-26 04:09:04 UTC) #29
Jered
On 2013/09/20 00:18:42, creis wrote: > On 2013/09/18 22:59:08, Jered wrote: > > On 2013/09/18 ...
7 years, 2 months ago (2013-09-26 22:24:49 UTC) #30
Charlie Reis
On 2013/09/26 22:24:49, Jered wrote: > On 2013/09/20 00:18:42, creis wrote: > > On 2013/09/18 ...
7 years, 2 months ago (2013-09-27 16:42:58 UTC) #31
Jered
On 2013/09/27 16:42:58, creis wrote: > On 2013/09/26 22:24:49, Jered wrote: > > On 2013/09/20 ...
7 years, 2 months ago (2013-09-27 22:16:22 UTC) #32
Charlie Reis
On 2013/09/27 22:16:22, Jered wrote: > Hey Charlie, I have updated the CL description to ...
7 years, 2 months ago (2013-09-28 00:48:16 UTC) #33
Jered
On 2013/09/28 00:48:16, creis wrote: > On 2013/09/27 22:16:22, Jered wrote: > > Hey Charlie, ...
7 years, 2 months ago (2013-09-30 17:04:56 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jered@chromium.org/23455047/156001
7 years, 2 months ago (2013-09-30 17:08:05 UTC) #35
commit-bot: I haz the power
7 years, 2 months ago (2013-10-01 01:33:38 UTC) #36
Message was sent while issue was closed.
Change committed as 226103

Powered by Google App Engine
This is Rietveld 408576698