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 fb80bdc839a49576eb3919a6296b0f40c4f08333..ab259f7a336cb6bf019bab1afc6057b05192f5ed 100644 |
--- a/chrome/browser/search_engines/template_url_service_test_util.cc |
+++ b/chrome/browser/search_engines/template_url_service_test_util.cc |
@@ -7,6 +7,7 @@ |
#include "base/macros.h" |
#include "base/run_loop.h" |
#include "base/threading/thread_task_runner_handle.h" |
+#include "chrome/browser/extensions/api/preference/preference_api.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_profile.h" |
@@ -24,8 +25,9 @@ namespace { |
class TestingTemplateURLServiceClient : public ChromeTemplateURLServiceClient { |
public: |
TestingTemplateURLServiceClient(history::HistoryService* history_service, |
+ extensions::PreferenceAPI* pref_api, |
base::string16* search_term) |
- : ChromeTemplateURLServiceClient(history_service), |
+ : ChromeTemplateURLServiceClient(history_service, pref_api), |
search_term_(search_term) {} |
void SetKeywordSearchTermsForURL(const GURL& url, |
@@ -112,6 +114,8 @@ void TemplateURLServiceTestUtil::ResetModel(bool verify_load) { |
if (model_) |
ClearModel(); |
search_terms_data_ = new TestingSearchTermsData("http://www.google.com/"); |
+ extensions::PreferenceAPI* pref_api = profile() ? |
+ extensions::PreferenceAPI::Get(profile()) : nullptr; |
model_.reset(new TemplateURLService( |
profile()->GetPrefs(), |
std::unique_ptr<SearchTermsData>(search_terms_data_), |
@@ -120,6 +124,7 @@ void TemplateURLServiceTestUtil::ResetModel(bool verify_load) { |
new TestingTemplateURLServiceClient( |
HistoryServiceFactory::GetForProfileIfExists( |
profile(), ServiceAccessType::EXPLICIT_ACCESS), |
+ pref_api, |
&search_term_)), |
NULL, NULL, base::Closure())); |
model()->AddObserver(this); |