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 "apps/app_load_service_factory.h" | 5 #include "apps/app_load_service_factory.h" |
6 | 6 |
7 #include "apps/app_load_service.h" | 7 #include "apps/app_load_service.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 9 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
10 #include "extensions/browser/app_window/app_window_registry.h" | 10 #include "extensions/browser/app_window/app_window_registry.h" |
11 #include "extensions/browser/extension_prefs_factory.h" | 11 #include "extensions/browser/extension_prefs_factory.h" |
12 #include "extensions/browser/extension_registry_factory.h" | 12 #include "extensions/browser/extension_registry_factory.h" |
13 #include "extensions/browser/extension_system_provider.h" | 13 #include "extensions/browser/extension_system_provider.h" |
14 #include "extensions/browser/extensions_browser_client.h" | 14 #include "extensions/browser/extensions_browser_client.h" |
15 | 15 |
16 namespace apps { | 16 namespace apps { |
17 | 17 |
18 // static | 18 // static |
19 AppLoadService* AppLoadServiceFactory::GetForProfile(Profile* profile) { | 19 AppLoadService* AppLoadServiceFactory::GetForProfile(Profile* profile) { |
20 return static_cast<AppLoadService*>( | 20 return static_cast<AppLoadService*>( |
21 GetInstance()->GetServiceForBrowserContext(profile, true)); | 21 GetInstance()->GetServiceForBrowserContext(profile, true)); |
22 } | 22 } |
23 | 23 |
24 AppLoadServiceFactory* AppLoadServiceFactory::GetInstance() { | 24 AppLoadServiceFactory* AppLoadServiceFactory::GetInstance() { |
25 return Singleton<AppLoadServiceFactory>::get(); | 25 return base::Singleton<AppLoadServiceFactory>::get(); |
26 } | 26 } |
27 | 27 |
28 AppLoadServiceFactory::AppLoadServiceFactory() | 28 AppLoadServiceFactory::AppLoadServiceFactory() |
29 : BrowserContextKeyedServiceFactory( | 29 : BrowserContextKeyedServiceFactory( |
30 "AppLoadService", | 30 "AppLoadService", |
31 BrowserContextDependencyManager::GetInstance()) { | 31 BrowserContextDependencyManager::GetInstance()) { |
32 DependsOn(extensions::AppWindowRegistry::Factory::GetInstance()); | 32 DependsOn(extensions::AppWindowRegistry::Factory::GetInstance()); |
33 DependsOn(extensions::ExtensionPrefsFactory::GetInstance()); | 33 DependsOn(extensions::ExtensionPrefsFactory::GetInstance()); |
34 DependsOn(extensions::ExtensionRegistryFactory::GetInstance()); | 34 DependsOn(extensions::ExtensionRegistryFactory::GetInstance()); |
35 DependsOn( | 35 DependsOn( |
(...skipping 17 matching lines...) Expand all Loading... |
53 } | 53 } |
54 | 54 |
55 content::BrowserContext* AppLoadServiceFactory::GetBrowserContextToUse( | 55 content::BrowserContext* AppLoadServiceFactory::GetBrowserContextToUse( |
56 content::BrowserContext* context) const { | 56 content::BrowserContext* context) const { |
57 // Redirected in incognito. | 57 // Redirected in incognito. |
58 return extensions::ExtensionsBrowserClient::Get()-> | 58 return extensions::ExtensionsBrowserClient::Get()-> |
59 GetOriginalContext(context); | 59 GetOriginalContext(context); |
60 } | 60 } |
61 | 61 |
62 } // namespace apps | 62 } // namespace apps |
OLD | NEW |