Chromium Code Reviews
DescriptionInstantExtended: 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 #Messages
Total messages: 36 (0 generated)
|