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

Unified Diff: chrome/browser/tab_contents/tab_contents.cc

Issue 113591: Fix Acid3 Test 48: LINKTEST, Chromium side.... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Made waiting more bearable. Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/renderer_host/test_render_view_host.h ('k') | chrome/browser/visitedlink_event_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents.cc
===================================================================
--- chrome/browser/tab_contents/tab_contents.cc (revision 19822)
+++ chrome/browser/tab_contents/tab_contents.cc (working copy)
@@ -1235,16 +1235,6 @@
// reload the page to stop blocking.
suppress_javascript_messages_ = false;
- // Update history. Note that this needs to happen after the entry is complete,
- // which WillNavigate[Main,Sub]Frame will do before this function is called.
- if (params.should_update_history) {
- // Most of the time, the displayURL matches the loaded URL, but for about:
- // URLs, we use a data: URL as the real value. We actually want to save
- // the about: URL to the history db and keep the data: URL hidden. This is
- // what the TabContents' URL getter does.
- UpdateHistoryForNavigation(GetURL(), details, params);
- }
-
// Notify the password manager of the navigation or form submit.
// TODO(brettw) bug 1343111: Password manager stuff in here needs to be
// cleaned up and covered by tests.
@@ -1575,9 +1565,21 @@
contents_mime_type_ = params.contents_mime_type;
NavigationController::LoadCommittedDetails details;
- if (!controller_.RendererDidNavigate(params, &details))
- return; // No navigation happened.
+ bool did_navigate = controller_.RendererDidNavigate(params, &details);
+ // Update history. Note that this needs to happen after the entry is complete,
+ // which WillNavigate[Main,Sub]Frame will do before this function is called.
+ if (params.should_update_history) {
+ // Most of the time, the displayURL matches the loaded URL, but for about:
+ // URLs, we use a data: URL as the real value. We actually want to save
+ // the about: URL to the history db and keep the data: URL hidden. This is
+ // what the TabContents' URL getter does.
+ UpdateHistoryForNavigation(GetURL(), details, params);
+ }
+
+ if (!did_navigate)
+ return; // No navigation happened.
+
// DO NOT ADD MORE STUFF TO THIS FUNCTION! Your component should either listen
// for the appropriate notification (best) or you can add it to
// DidNavigateMainFramePostCommit / DidNavigateAnyFramePostCommit (only if
« no previous file with comments | « chrome/browser/renderer_host/test_render_view_host.h ('k') | chrome/browser/visitedlink_event_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698