Chromium Code Reviews| Index: chrome/browser/search_engines/template_url_service_test_util.cc |
| diff --git a/chrome/browser/search_engines/template_url_service_test_util.cc b/chrome/browser/search_engines/template_url_service_test_util.cc |
| index fc11cca5d63b3b24462647fd0f45e334489f7393..b6cce22ade02c4bb84948353abada6610cacaa43 100644 |
| --- a/chrome/browser/search_engines/template_url_service_test_util.cc |
| +++ b/chrome/browser/search_engines/template_url_service_test_util.cc |
| @@ -6,6 +6,7 @@ |
| #include "base/message_loop/message_loop_proxy.h" |
| #include "base/run_loop.h" |
| +#include "chrome/browser/history/history_service_factory.h" |
| #include "chrome/browser/search_engines/chrome_template_url_service_client.h" |
| #include "chrome/test/base/testing_pref_service_syncable.h" |
| #include "chrome/test/base/testing_profile.h" |
| @@ -21,9 +22,9 @@ namespace { |
| class TestingTemplateURLServiceClient : public ChromeTemplateURLServiceClient { |
| public: |
| - TestingTemplateURLServiceClient(Profile* profile, |
| + TestingTemplateURLServiceClient(HistoryService* history_service, |
| base::string16* search_term) |
| - : ChromeTemplateURLServiceClient(profile), |
| + : ChromeTemplateURLServiceClient(history_service), |
| search_term_(search_term) {} |
| virtual void SetKeywordSearchTermsForURL( |
| @@ -111,11 +112,15 @@ void TemplateURLServiceTestUtil::ResetModel(bool verify_load) { |
| if (model_) |
| ClearModel(); |
| search_terms_data_ = new TestingSearchTermsData("http://www.google.com/"); |
| + DCHECK(profile()->CreateHistoryService(false, false)); |
|
droger
2014/10/14 15:15:24
Is it OK if this code is not called in release?
O
sdefresne
2014/10/14 16:02:05
Done.
|
| model_.reset(new TemplateURLService( |
| profile()->GetPrefs(), scoped_ptr<SearchTermsData>(search_terms_data_), |
| web_data_service_.get(), |
| scoped_ptr<TemplateURLServiceClient>( |
| - new TestingTemplateURLServiceClient(profile(), &search_term_)), |
| + new TestingTemplateURLServiceClient( |
| + HistoryServiceFactory::GetForProfile(profile(), |
| + Profile::EXPLICIT_ACCESS), |
| + &search_term_)), |
| NULL, NULL, base::Closure())); |
| model()->AddObserver(this); |
| changed_count_ = 0; |