| Index: chrome/browser/search_engines/template_url_service_factory.cc
|
| diff --git a/chrome/browser/search_engines/template_url_service_factory.cc b/chrome/browser/search_engines/template_url_service_factory.cc
|
| index cc2498979675e6eac6902d42b579529b01f21fa2..80b55b5223d96f6b9c8f0426cf152300c211f38b 100644
|
| --- a/chrome/browser/search_engines/template_url_service_factory.cc
|
| +++ b/chrome/browser/search_engines/template_url_service_factory.cc
|
| @@ -13,7 +13,9 @@
|
| #include "chrome/browser/history/history_service_factory.h"
|
| #include "chrome/browser/profiles/incognito_helpers.h"
|
| #include "chrome/browser/rlz/rlz.h"
|
| +#include "chrome/browser/search_engines/chrome_template_url_service_client.h"
|
| #include "chrome/browser/search_engines/template_url_service.h"
|
| +#include "chrome/browser/search_engines/ui_thread_search_terms_data.h"
|
| #include "chrome/browser/webdata/web_data_service_factory.h"
|
| #include "components/keyed_service/content/browser_context_dependency_manager.h"
|
| #include "components/pref_registry/pref_registry_syncable.h"
|
| @@ -33,7 +35,7 @@ TemplateURLServiceFactory* TemplateURLServiceFactory::GetInstance() {
|
|
|
| // static
|
| KeyedService* TemplateURLServiceFactory::BuildInstanceFor(
|
| - content::BrowserContext* profile) {
|
| + content::BrowserContext* context) {
|
| base::Closure dsp_change_callback;
|
| #if defined(ENABLE_RLZ)
|
| dsp_change_callback =
|
| @@ -42,9 +44,17 @@ KeyedService* TemplateURLServiceFactory::BuildInstanceFor(
|
| RLZTracker::ChromeOmnibox(),
|
| rlz_lib::SET_TO_GOOGLE);
|
| #endif
|
| - return new TemplateURLService(static_cast<Profile*>(profile),
|
| - g_browser_process->rappor_service(),
|
| - dsp_change_callback);
|
| + Profile* profile = static_cast<Profile*>(context);
|
| + return new TemplateURLService(
|
| + profile->GetPrefs(),
|
| + scoped_ptr<SearchTermsData>(new UIThreadSearchTermsData(profile)),
|
| + WebDataServiceFactory::GetKeywordWebDataForProfile(
|
| + profile, Profile::EXPLICIT_ACCESS),
|
| + scoped_ptr<TemplateURLServiceClient>(
|
| + new ChromeTemplateURLServiceClient(profile)),
|
| + GoogleURLTrackerFactory::GetForProfile(profile),
|
| + g_browser_process->rappor_service(),
|
| + dsp_change_callback);
|
| }
|
|
|
| TemplateURLServiceFactory::TemplateURLServiceFactory()
|
|
|