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

Side by Side Diff: chrome/browser/search/instant_service_factory.cc

Issue 393173002: Moves some functions in search.h to components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android fix 3 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
« no previous file with comments | « chrome/browser/omnibox/omnibox_field_trial_unittest.cc ('k') | chrome/browser/search/search.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/instant_service_factory.h" 5 #include "chrome/browser/search/instant_service_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/instant_service.h" 9 #include "chrome/browser/search/instant_service.h"
10 #include "chrome/browser/search/search.h"
11 #include "chrome/browser/search_engines/template_url_service_factory.h" 10 #include "chrome/browser/search_engines/template_url_service_factory.h"
12 #include "chrome/browser/themes/theme_service_factory.h" 11 #include "chrome/browser/themes/theme_service_factory.h"
13 #include "components/keyed_service/content/browser_context_dependency_manager.h" 12 #include "components/keyed_service/content/browser_context_dependency_manager.h"
13 #include "components/search/search.h"
14 14
15 // static 15 // static
16 InstantService* InstantServiceFactory::GetForProfile(Profile* profile) { 16 InstantService* InstantServiceFactory::GetForProfile(Profile* profile) {
17 if (!chrome::IsInstantExtendedAPIEnabled()) 17 if (!chrome::IsInstantExtendedAPIEnabled())
18 return NULL; 18 return NULL;
19 19
20 return static_cast<InstantService*>( 20 return static_cast<InstantService*>(
21 GetInstance()->GetServiceForBrowserContext(profile, true)); 21 GetInstance()->GetServiceForBrowserContext(profile, true));
22 } 22 }
23 23
(...skipping 18 matching lines...) Expand all
42 content::BrowserContext* InstantServiceFactory::GetBrowserContextToUse( 42 content::BrowserContext* InstantServiceFactory::GetBrowserContextToUse(
43 content::BrowserContext* context) const { 43 content::BrowserContext* context) const {
44 return chrome::GetBrowserContextOwnInstanceInIncognito(context); 44 return chrome::GetBrowserContextOwnInstanceInIncognito(context);
45 } 45 }
46 46
47 KeyedService* InstantServiceFactory::BuildServiceInstanceFor( 47 KeyedService* InstantServiceFactory::BuildServiceInstanceFor(
48 content::BrowserContext* profile) const { 48 content::BrowserContext* profile) const {
49 return chrome::IsInstantExtendedAPIEnabled() ? 49 return chrome::IsInstantExtendedAPIEnabled() ?
50 new InstantService(static_cast<Profile*>(profile)) : NULL; 50 new InstantService(static_cast<Profile*>(profile)) : NULL;
51 } 51 }
OLDNEW
« no previous file with comments | « chrome/browser/omnibox/omnibox_field_trial_unittest.cc ('k') | chrome/browser/search/search.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698