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

Side by Side Diff: chrome/browser/chromeos/launcher_search_provider/service_factory.cc

Issue 1208963003: Move GN obj files to target-specific dirs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: \ Created 5 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/launcher_search_provider/service_factory.h"
6
7 #include "chrome/browser/chromeos/launcher_search_provider/service.h"
8 #include "components/keyed_service/content/browser_context_dependency_manager.h"
9 #include "extensions/browser/extension_registry.h"
10 #include "extensions/browser/extension_registry_factory.h"
11
12 namespace chromeos {
13 namespace launcher_search_provider {
14
15 namespace {
16 const char kLauncherSearchProviderServiceName[] =
17 "LauncherSearchProviderService";
18 } // namespace
19
20 // static
21 Service* ServiceFactory::Get(content::BrowserContext* context) {
22 return static_cast<Service*>(
23 GetInstance()->GetServiceForBrowserContext(context, true));
24 }
25
26 // static
27 ServiceFactory* ServiceFactory::GetInstance() {
28 return Singleton<ServiceFactory>::get();
29 }
30
31 ServiceFactory::ServiceFactory()
32 : BrowserContextKeyedServiceFactory(
33 kLauncherSearchProviderServiceName,
34 BrowserContextDependencyManager::GetInstance()) {
35 DependsOn(extensions::ExtensionRegistryFactory::GetInstance());
36 }
37
38 ServiceFactory::~ServiceFactory() {
39 }
40
41 KeyedService* ServiceFactory::BuildServiceInstanceFor(
42 content::BrowserContext* profile) const {
43 return new Service(
44 Profile::FromBrowserContext(profile),
45 extensions::ExtensionRegistry::Get(Profile::FromBrowserContext(profile)));
46 }
47
48 bool ServiceFactory::ServiceIsCreatedWithBrowserContext() const {
49 return true;
50 }
51
52 } // namespace launcher_search_provider
53 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/launcher_search_provider/service_factory.h ('k') | chrome/browser/chromeos/preferences_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698