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

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

Issue 367413003: No chrome dependencies in TemplateURLFetcher and TemplateURLParser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 6 years, 5 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 | Annotate | Revision Log
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_fetcher_factory.h" 5 #include "chrome/browser/search_engines/template_url_fetcher_factory.h"
6 6
7 #include "chrome/browser/profiles/incognito_helpers.h" 7 #include "chrome/browser/profiles/incognito_helpers.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/search_engines/template_url_fetcher.h" 9 #include "chrome/browser/search_engines/template_url_fetcher.h"
10 #include "chrome/browser/search_engines/template_url_service_factory.h" 10 #include "chrome/browser/search_engines/template_url_service_factory.h"
(...skipping 23 matching lines...) Expand all
34 "TemplateURLFetcher", 34 "TemplateURLFetcher",
35 BrowserContextDependencyManager::GetInstance()) { 35 BrowserContextDependencyManager::GetInstance()) {
36 DependsOn(TemplateURLServiceFactory::GetInstance()); 36 DependsOn(TemplateURLServiceFactory::GetInstance());
37 } 37 }
38 38
39 TemplateURLFetcherFactory::~TemplateURLFetcherFactory() { 39 TemplateURLFetcherFactory::~TemplateURLFetcherFactory() {
40 } 40 }
41 41
42 KeyedService* TemplateURLFetcherFactory::BuildServiceInstanceFor( 42 KeyedService* TemplateURLFetcherFactory::BuildServiceInstanceFor(
43 content::BrowserContext* profile) const { 43 content::BrowserContext* profile) const {
44 return new TemplateURLFetcher(static_cast<Profile*>(profile)); 44 return new TemplateURLFetcher(
45 TemplateURLServiceFactory::GetForProfile(static_cast<Profile*>(profile)),
46 profile->GetRequestContext());
45 } 47 }
46 48
47 content::BrowserContext* TemplateURLFetcherFactory::GetBrowserContextToUse( 49 content::BrowserContext* TemplateURLFetcherFactory::GetBrowserContextToUse(
48 content::BrowserContext* context) const { 50 content::BrowserContext* context) const {
49 return chrome::GetBrowserContextRedirectedInIncognito(context); 51 return chrome::GetBrowserContextRedirectedInIncognito(context);
50 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698