Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / search_engines / template_url_fetcher_factory.cc
index 30a07a4..71d0fb5 100644 (file)
@@ -6,9 +6,9 @@
 
 #include "chrome/browser/profiles/incognito_helpers.h"
 #include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/search_engines/template_url_fetcher.h"
 #include "chrome/browser/search_engines/template_url_service_factory.h"
 #include "components/keyed_service/content/browser_context_dependency_manager.h"
+#include "components/search_engines/template_url_fetcher.h"
 
 // static
 TemplateURLFetcher* TemplateURLFetcherFactory::GetForProfile(
@@ -41,7 +41,9 @@ TemplateURLFetcherFactory::~TemplateURLFetcherFactory() {
 
 KeyedService* TemplateURLFetcherFactory::BuildServiceInstanceFor(
     content::BrowserContext* profile) const {
-  return new TemplateURLFetcher(static_cast<Profile*>(profile));
+  return new TemplateURLFetcher(
+      TemplateURLServiceFactory::GetForProfile(static_cast<Profile*>(profile)),
+      profile->GetRequestContext());
 }
 
 content::BrowserContext* TemplateURLFetcherFactory::GetBrowserContextToUse(