summaryrefslogtreecommitdiffstats
path: root/chrome/browser/search_engines
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-19 20:41:02 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-19 20:41:02 +0000
commit0326752ddaebd5d2f3835c22839951d337f23923 (patch)
treec5c1701b28174ef6ebfccc2355991416c97df1ce /chrome/browser/search_engines
parent88942a2dab7da11dc89b4fe95151fdefa6cef036 (diff)
downloadchromium_src-0326752ddaebd5d2f3835c22839951d337f23923.zip
chromium_src-0326752ddaebd5d2f3835c22839951d337f23923.tar.gz
chromium_src-0326752ddaebd5d2f3835c22839951d337f23923.tar.bz2
A new field to describe the sources of history urls(visits) is added. This field is recorded in visit_database.
So far, it can tell imported, synchronized, entension added or other(mainly testing) entries from user browsed entries. In the future, history extension API may allow queries to combinate with this criterion. BUG=none TEST=Unit tests are already included. Please test the web browser with history from previous versions to make sure the migration could be done properly. Also try to import or sync some history and inspect the sources added to the visit_source table in hitory database are correct. Original review=http://codereview.chromium.org/2906004/show Patch by weili@google.com git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56742 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines')
-rw-r--r--chrome/browser/search_engines/template_url_model.cc2
-rw-r--r--chrome/browser/search_engines/template_url_model_unittest.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc
index d777225..5f2d5fb 100644
--- a/chrome/browser/search_engines/template_url_model.cc
+++ b/chrome/browser/search_engines/template_url_model.cc
@@ -1009,7 +1009,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,
- history::RedirectList(), false);
+ history::RedirectList(), history::SOURCE_BROWSED, 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 baee15a..5e174e3 100644
--- a/chrome/browser/search_engines/template_url_model_unittest.cc
+++ b/chrome/browser/search_engines/template_url_model_unittest.cc
@@ -689,7 +689,7 @@ TEST_F(TemplateURLModelTest, GenerateVisitOnKeyword) {
GURL(t_url->url()->ReplaceSearchTerms(*t_url, L"blah", 0,
std::wstring())),
NULL, 0, GURL(), PageTransition::KEYWORD, history::RedirectList(),
- false);
+ history::SOURCE_BROWSED, false);
// Wait for history to finish processing the request.
profile_->BlockUntilHistoryProcessesPendingRequests();