summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents/tab_contents.cc
diff options
context:
space:
mode:
authoryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 04:51:47 +0000
committeryuzo@chromium.org <yuzo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-01 04:51:47 +0000
commitbefd8d82ec47c02d6b17d9fa7b6c1f3bb703150f (patch)
treecdcbb4ced140ad2db3018c3fa74e14d5f1540d59 /chrome/browser/tab_contents/tab_contents.cc
parentfeab536198e21e8f4777c3c8035a6ca6479f6912 (diff)
downloadchromium_src-befd8d82ec47c02d6b17d9fa7b6c1f3bb703150f.zip
chromium_src-befd8d82ec47c02d6b17d9fa7b6c1f3bb703150f.tar.gz
chromium_src-befd8d82ec47c02d6b17d9fa7b6c1f3bb703150f.tar.bz2
Fix: Certain redirections remove sites from the history
Currently, PageTransition::CHAIN_END flag is removed from a History database entry for a redirect source, even when the redirect is user initiated. This change prevents the flag removal for user-initiated redirects. TEST=Open http://www.google.com/ig and click on tabs multiple times. Without this change, only the last tab clicked appears in the History page (CTRL+H). With this change, all the tabs should appear. TESTED=gcl try, manually BUG=11355 Review URL: http://codereview.chromium.org/147145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19708 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents/tab_contents.cc')
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index aa5de91..5b89157 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1246,7 +1246,7 @@ void TabContents::DidNavigateAnyFramePostCommit(
// 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(), params);
+ UpdateHistoryForNavigation(GetURL(), details, params);
}
// Notify the password manager of the navigation or form submit.
@@ -1318,6 +1318,7 @@ void TabContents::UpdateMaxPageIDIfNecessary(SiteInstance* site_instance,
void TabContents::UpdateHistoryForNavigation(
const GURL& display_url,
+ const NavigationController::LoadCommittedDetails& details,
const ViewHostMsg_FrameNavigate_Params& params) {
if (profile()->IsOffTheRecord())
return;
@@ -1337,10 +1338,11 @@ void TabContents::UpdateHistoryForNavigation(
if (!redirects.empty())
redirects.back() = display_url;
hs->AddPage(display_url, this, params.page_id, params.referrer,
- params.transition, redirects);
+ params.transition, redirects, details.did_replace_entry);
} else {
hs->AddPage(params.url, this, params.page_id, params.referrer,
- params.transition, params.redirects);
+ params.transition, params.redirects,
+ details.did_replace_entry);
}
}
}