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

Issue 115919: Consider an immediate redirect as machine-initiated and slow one as... (Closed)

Created:
11 years, 6 months ago by yuzo
Modified:
9 years, 7 months ago
Reviewers:
jon, Mark Larson, brettw
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Consider an immediate redirect as machine-initiated and slow one as user-initiated in maintaining navigation entries. Also, ignore redirect- or machine-initiated- new subframe navigations. The current code treats all redirects as machine-initiated in processing navigation to a new page (to fix Bugs 9663 and 10531). This is not always appropriate, because some sites, e.g., www.google.com/ig, use redirect to implement user-initiated navigation (Bug 11896). This change assumes that a machine-initiated redirect happens within 300ms since the last document load was completed, while a user-initiated one happens later. This assumption is not always correct, e.g., a user may cause transition within 300ms. But I cannot think of any better ways to tell if a redirect is machine- initiated or user-initiated. I believe this change works good enough, at least better than the status quo. TEST=Open http://www.hp.com and observe it redirects to http://www.hp.com/#Product . Hit Back button and observe the former URL is not visited. Open http://www.google.com/ig and click tabs inside the page, and try hitting Back and Forward to see if the navigation is right. Open http://www.google.com/codesearch, search for something, click on a result item, and try hitting Back. BUG=11896, 12820

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+312 lines, -28 lines) Patch
M chrome/browser/renderer_host/render_view_host.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/navigation_controller.h View 1 2 3 4 5 6 7 8 9 4 chunks +20 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/navigation_controller.cc View 1 2 3 4 5 6 7 8 9 6 chunks +50 lines, -5 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents.cc View 1 2 3 4 5 6 7 8 9 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/data/History/history_length_test_page_1.html View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -4 lines 0 comments Download
A chrome/test/data/History/history_length_test_page_11.html View 1 chunk +35 lines, -0 lines 0 comments Download
A chrome/test/data/History/history_length_test_page_12.html View 1 chunk +31 lines, -0 lines 0 comments Download
M chrome/test/data/History/history_length_test_page_2.html View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -2 lines 0 comments Download
A chrome/test/data/History/history_length_test_page_21.html View 6 1 chunk +33 lines, -0 lines 0 comments Download
A chrome/test/data/History/history_length_test_page_22.html View 6 1 chunk +31 lines, -0 lines 0 comments Download
M chrome/test/data/History/history_length_test_page_3.html View 1 2 3 4 5 6 7 8 9 4 chunks +11 lines, -8 lines 0 comments Download
M chrome/test/data/History/history_length_test_page_4.html View 1 2 3 4 5 6 7 8 9 4 chunks +9 lines, -7 lines 0 comments Download
M chrome/test/ui/history_uitest.cc View 1 2 3 4 5 6 7 8 9 4 chunks +61 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
yuzo
Hi, Brett, Do you think you have time to review this? I'm not sure if ...
11 years, 6 months ago (2009-05-29 10:00:55 UTC) #1
brettw
"FrameDocumentLoaded" seems somewhat unclear to me. How about ViewHostMsg_DocumentLoadedInFrame? The corresponding delegate function would be ...
11 years, 6 months ago (2009-06-01 17:01:25 UTC) #2
yuzo
Hi, Brett, Thank you for the review. I renamed the message and the functions as ...
11 years, 6 months ago (2009-06-02 12:03:06 UTC) #3
brettw
On 2009/06/02 12:03:06, yuzo wrote: > Hi, Brett, > > Thank you for the review. ...
11 years, 6 months ago (2009-06-02 23:16:00 UTC) #4
yuzo
Hi, Brett, Thank you for your comments. Yes, OnUserGesture is what I wanted. :) I ...
11 years, 6 months ago (2009-06-03 09:29:07 UTC) #5
brettw
On 2009/06/03 09:29:07, yuzo wrote: > Hi, Brett, > > Thank you for your comments. ...
11 years, 6 months ago (2009-06-03 17:02:39 UTC) #6
jon
We should consider removing the original CL while we work on a fix. The current ...
11 years, 6 months ago (2009-06-03 23:52:22 UTC) #7
yuzo
Sorry for the late response -- I was sick yesterday. Brett, sorry for bothering you, ...
11 years, 6 months ago (2009-06-05 02:00:37 UTC) #8
yuzo
I hit another flakiness :-( . I disabled the tests for now. Yuzo On 2009/06/05 ...
11 years, 6 months ago (2009-06-05 04:17:03 UTC) #9
Mark Larson
Is this progressing? It's a regression we want to get fixed so we can push ...
11 years, 6 months ago (2009-06-10 22:16:59 UTC) #10
brettw
LGTM
11 years, 6 months ago (2009-06-10 22:24:02 UTC) #11
yuzo
11 years, 6 months ago (2009-06-15 08:21:50 UTC) #12
Submitted as r18373

Powered by Google App Engine
This is Rietveld 408576698