OLD | NEW |
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/apps/ephemeral_app_service_factory.h" | 5 #include "chrome/browser/apps/ephemeral_app_service_factory.h" |
6 | 6 |
7 #include "apps/app_lifetime_monitor_factory.h" | 7 #include "apps/app_lifetime_monitor_factory.h" |
8 #include "chrome/browser/apps/ephemeral_app_service.h" | 8 #include "chrome/browser/apps/ephemeral_app_service.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 10 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
11 #include "extensions/browser/extension_system_provider.h" | 11 #include "extensions/browser/extension_system_provider.h" |
12 #include "extensions/browser/extensions_browser_client.h" | 12 #include "extensions/browser/extensions_browser_client.h" |
13 | 13 |
14 using extensions::ExtensionsBrowserClient; | 14 using extensions::ExtensionsBrowserClient; |
15 | 15 |
16 // static | 16 // static |
17 EphemeralAppService* | 17 EphemeralAppService* |
18 EphemeralAppServiceFactory::GetForProfile(Profile* profile) { | 18 EphemeralAppServiceFactory::GetForProfile(Profile* profile) { |
19 return static_cast<EphemeralAppService*>( | 19 return static_cast<EphemeralAppService*>( |
20 GetInstance()->GetServiceForBrowserContext(profile, true)); | 20 GetInstance()->GetServiceForBrowserContext(profile, true)); |
21 } | 21 } |
22 | 22 |
23 // static | 23 // static |
24 EphemeralAppServiceFactory* EphemeralAppServiceFactory::GetInstance() { | 24 EphemeralAppServiceFactory* EphemeralAppServiceFactory::GetInstance() { |
25 return Singleton<EphemeralAppServiceFactory>::get(); | 25 return base::Singleton<EphemeralAppServiceFactory>::get(); |
26 } | 26 } |
27 | 27 |
28 EphemeralAppServiceFactory::EphemeralAppServiceFactory() | 28 EphemeralAppServiceFactory::EphemeralAppServiceFactory() |
29 : BrowserContextKeyedServiceFactory( | 29 : BrowserContextKeyedServiceFactory( |
30 "EphemeralAppService", | 30 "EphemeralAppService", |
31 BrowserContextDependencyManager::GetInstance()) { | 31 BrowserContextDependencyManager::GetInstance()) { |
32 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 32 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |
33 DependsOn(apps::AppLifetimeMonitorFactory::GetInstance()); | 33 DependsOn(apps::AppLifetimeMonitorFactory::GetInstance()); |
34 } | 34 } |
35 | 35 |
(...skipping 10 matching lines...) Expand all Loading... |
46 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); | 46 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); |
47 } | 47 } |
48 | 48 |
49 bool EphemeralAppServiceFactory::ServiceIsCreatedWithBrowserContext() const { | 49 bool EphemeralAppServiceFactory::ServiceIsCreatedWithBrowserContext() const { |
50 return true; | 50 return true; |
51 } | 51 } |
52 | 52 |
53 bool EphemeralAppServiceFactory::ServiceIsNULLWhileTesting() const { | 53 bool EphemeralAppServiceFactory::ServiceIsNULLWhileTesting() const { |
54 return true; | 54 return true; |
55 } | 55 } |
OLD | NEW |