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

Side by Side Diff: chrome/browser/search_engines/template_url_service_test_util.cc

Issue 648653003: Standardize usage of virtual/override/final in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/search_engines/template_url_service_test_util.h" 5 #include "chrome/browser/search_engines/template_url_service_test_util.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/history/history_service_factory.h" 9 #include "chrome/browser/history/history_service_factory.h"
10 #include "chrome/browser/search_engines/chrome_template_url_service_client.h" 10 #include "chrome/browser/search_engines/chrome_template_url_service_client.h"
11 #include "chrome/test/base/testing_pref_service_syncable.h" 11 #include "chrome/test/base/testing_pref_service_syncable.h"
12 #include "chrome/test/base/testing_profile.h" 12 #include "chrome/test/base/testing_profile.h"
13 #include "components/search_engines/default_search_pref_test_util.h" 13 #include "components/search_engines/default_search_pref_test_util.h"
14 #include "components/search_engines/keyword_table.h" 14 #include "components/search_engines/keyword_table.h"
15 #include "components/search_engines/keyword_web_data_service.h" 15 #include "components/search_engines/keyword_web_data_service.h"
16 #include "components/search_engines/template_url_service.h" 16 #include "components/search_engines/template_url_service.h"
17 #include "components/search_engines/testing_search_terms_data.h" 17 #include "components/search_engines/testing_search_terms_data.h"
18 #include "components/webdata/common/web_database_service.h" 18 #include "components/webdata/common/web_database_service.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 namespace { 21 namespace {
22 22
23 class TestingTemplateURLServiceClient : public ChromeTemplateURLServiceClient { 23 class TestingTemplateURLServiceClient : public ChromeTemplateURLServiceClient {
24 public: 24 public:
25 TestingTemplateURLServiceClient(HistoryService* history_service, 25 TestingTemplateURLServiceClient(HistoryService* history_service,
26 base::string16* search_term) 26 base::string16* search_term)
27 : ChromeTemplateURLServiceClient(history_service), 27 : ChromeTemplateURLServiceClient(history_service),
28 search_term_(search_term) {} 28 search_term_(search_term) {}
29 29
30 virtual void SetKeywordSearchTermsForURL( 30 void SetKeywordSearchTermsForURL(const GURL& url,
31 const GURL& url, 31 TemplateURLID id,
32 TemplateURLID id, 32 const base::string16& term) override {
33 const base::string16& term) override {
34 *search_term_ = term; 33 *search_term_ = term;
35 } 34 }
36 35
37 private: 36 private:
38 base::string16* search_term_; 37 base::string16* search_term_;
39 38
40 DISALLOW_COPY_AND_ASSIGN(TestingTemplateURLServiceClient); 39 DISALLOW_COPY_AND_ASSIGN(TestingTemplateURLServiceClient);
41 }; 40 };
42 41
43 } // namespace 42 } // namespace
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 DefaultSearchPrefTestUtil::SetManagedPref( 151 DefaultSearchPrefTestUtil::SetManagedPref(
153 profile()->GetTestingPrefService(), 152 profile()->GetTestingPrefService(),
154 enabled, name, keyword, search_url, suggest_url, icon_url, encodings, 153 enabled, name, keyword, search_url, suggest_url, icon_url, encodings,
155 alternate_url, search_terms_replacement_key); 154 alternate_url, search_terms_replacement_key);
156 } 155 }
157 156
158 void TemplateURLServiceTestUtil::RemoveManagedDefaultSearchPreferences() { 157 void TemplateURLServiceTestUtil::RemoveManagedDefaultSearchPreferences() {
159 DefaultSearchPrefTestUtil::RemoveManagedPref( 158 DefaultSearchPrefTestUtil::RemoveManagedPref(
160 profile()->GetTestingPrefService()); 159 profile()->GetTestingPrefService());
161 } 160 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698