summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authordglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-03 17:38:39 +0000
committerdglazkov@chromium.org <dglazkov@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-03 17:38:39 +0000
commit3e90d4a00082fd985ab610cd2faff84b5c597a4e (patch)
tree4d2f0da17f4fb68bab53381c9f49351380a24127 /chrome/browser/tab_contents
parentfd694982d0e1ee8b3e1753d9c48b01c1a633ac27 (diff)
downloadchromium_src-3e90d4a00082fd985ab610cd2faff84b5c597a4e.zip
chromium_src-3e90d4a00082fd985ab610cd2faff84b5c597a4e.tar.gz
chromium_src-3e90d4a00082fd985ab610cd2faff84b5c597a4e.tar.bz2
Fix Acid3 Test 48: LINKTEST, Chromium side....
R=brettw BUG=http://crbug.com/231 BUG=http://crubg.com/5160 TEST=ExpireHistoryTest.ArchiveSomeOldHistory TEST=ExpireHistoryTest.ExpiringVisitsReader TEST=VisitedLinkTest.Listener TEST=VisitedLinkTest.Resizing TEST=VisitedLinkRelayTest.* TEST=VisitedLinkEventsTest.* Review URL: http://codereview.chromium.org/113591 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19910 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc26
1 files changed, 14 insertions, 12 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 4508d34..d303c6a 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1236,16 +1236,6 @@ void TabContents::DidNavigateAnyFramePostCommit(
// 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.
@@ -1576,8 +1566,20 @@ void TabContents::DidNavigate(RenderViewHost* rvh,
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