From befd8d82ec47c02d6b17d9fa7b6c1f3bb703150f Mon Sep 17 00:00:00 2001 From: "yuzo@chromium.org" Date: Wed, 1 Jul 2009 04:51:47 +0000 Subject: 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 --- chrome/browser/search_engines/template_url_model.cc | 2 +- chrome/browser/search_engines/template_url_model_unittest.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'chrome/browser/search_engines') diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc index 8953673..2d0ebf2 100644 --- a/chrome/browser/search_engines/template_url_model.cc +++ b/chrome/browser/search_engines/template_url_model.cc @@ -954,7 +954,7 @@ void TemplateURLModel::AddTabToSearchVisit(const TemplateURL& t_url) { // autocompleted even if the user doesn't type the url in directly. history->AddPage(url, NULL, 0, GURL(), PageTransition::KEYWORD_GENERATED, - HistoryService::RedirectList()); + HistoryService::RedirectList(), false); } // static diff --git a/chrome/browser/search_engines/template_url_model_unittest.cc b/chrome/browser/search_engines/template_url_model_unittest.cc index 1889262..cbaa576 100644 --- a/chrome/browser/search_engines/template_url_model_unittest.cc +++ b/chrome/browser/search_engines/template_url_model_unittest.cc @@ -671,7 +671,8 @@ TEST_F(TemplateURLModelTest, GenerateVisitOnKeyword) { history->AddPage( GURL(WideToUTF8(t_url->url()->ReplaceSearchTerms(*t_url, L"blah", 0, std::wstring()))), - NULL, 0, GURL(), PageTransition::KEYWORD, HistoryService::RedirectList()); + NULL, 0, GURL(), PageTransition::KEYWORD, HistoryService::RedirectList(), + false); // Wait for history to finish processing the request. profile_->BlockUntilHistoryProcessesPendingRequests(); -- cgit v1.1