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

Unified Diff: chrome/browser/search_engines/template_url_service_unittest.cc

Issue 10458077: When the Google base URL changes and causes keyword updates, save those to the database. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
Index: chrome/browser/search_engines/template_url_service_unittest.cc
===================================================================
--- chrome/browser/search_engines/template_url_service_unittest.cc (revision 140592)
+++ chrome/browser/search_engines/template_url_service_unittest.cc (working copy)
@@ -124,6 +124,28 @@
return google_base_url_;
}
+
+// QueryHistoryCallbackImpl ---------------------------------------------------
+
+struct QueryHistoryCallbackImpl {
+ QueryHistoryCallbackImpl() : success(false) {}
+
+ void Callback(HistoryService::Handle handle,
+ bool success,
+ const history::URLRow* row,
+ history::VisitVector* visits) {
+ this->success = success;
+ if (row)
+ this->row = *row;
+ if (visits)
+ this->visits = *visits;
+ }
+
+ bool success;
+ history::URLRow row;
+ history::VisitVector visits;
+};
+
}; // namespace
@@ -1018,25 +1040,6 @@
EXPECT_EQ(ASCIIToUTF16("google.fr"), t_url->keyword());
}
-struct QueryHistoryCallbackImpl {
- QueryHistoryCallbackImpl() : success(false) {}
-
- void Callback(HistoryService::Handle handle,
- bool success,
- const history::URLRow* row,
- history::VisitVector* visits) {
- this->success = success;
- if (row)
- this->row = *row;
- if (visits)
- this->visits = *visits;
- }
-
- bool success;
- history::URLRow row;
- history::VisitVector visits;
-};
-
// Make sure TemplateURLService generates a KEYWORD_GENERATED visit for
// KEYWORD visits.
TEST_F(TemplateURLServiceTest, GenerateVisitOnKeyword) {
« no previous file with comments | « chrome/browser/search_engines/template_url_service_test_util.cc ('k') | chrome/browser/search_engines/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698