OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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/extensions/api/passwords_private/passwords_private_even
t_router_factory.h" | 5 #include "chrome/browser/extensions/api/passwords_private/passwords_private_even
t_router_factory.h" |
6 | 6 |
7 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele
gate_factory.h" | 7 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele
gate_factory.h" |
8 #include "chrome/browser/extensions/api/passwords_private/passwords_private_even
t_router.h" | 8 #include "chrome/browser/extensions/api/passwords_private/passwords_private_even
t_router.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 "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.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 namespace extensions { | 14 namespace extensions { |
15 | 15 |
16 // static | 16 // static |
17 PasswordsPrivateEventRouter* | 17 PasswordsPrivateEventRouter* |
18 PasswordsPrivateEventRouterFactory::GetForProfile( | 18 PasswordsPrivateEventRouterFactory::GetForProfile( |
19 content::BrowserContext* context) { | 19 content::BrowserContext* context) { |
20 return static_cast<PasswordsPrivateEventRouter*>( | 20 return static_cast<PasswordsPrivateEventRouter*>( |
21 GetInstance()->GetServiceForBrowserContext(context, true)); | 21 GetInstance()->GetServiceForBrowserContext(context, true)); |
22 } | 22 } |
23 | 23 |
24 // static | 24 // static |
25 PasswordsPrivateEventRouterFactory* | 25 PasswordsPrivateEventRouterFactory* |
26 PasswordsPrivateEventRouterFactory::GetInstance() { | 26 PasswordsPrivateEventRouterFactory::GetInstance() { |
27 return Singleton<PasswordsPrivateEventRouterFactory>::get(); | 27 return base::Singleton<PasswordsPrivateEventRouterFactory>::get(); |
28 } | 28 } |
29 | 29 |
30 PasswordsPrivateEventRouterFactory::PasswordsPrivateEventRouterFactory() | 30 PasswordsPrivateEventRouterFactory::PasswordsPrivateEventRouterFactory() |
31 : BrowserContextKeyedServiceFactory( | 31 : BrowserContextKeyedServiceFactory( |
32 "PasswordsPrivateEventRouter", | 32 "PasswordsPrivateEventRouter", |
33 BrowserContextDependencyManager::GetInstance()) { | 33 BrowserContextDependencyManager::GetInstance()) { |
34 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 34 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |
35 DependsOn(PasswordsPrivateDelegateFactory::GetInstance()); | 35 DependsOn(PasswordsPrivateDelegateFactory::GetInstance()); |
36 } | 36 } |
37 | 37 |
(...skipping 15 matching lines...) Expand all Loading... |
53 bool PasswordsPrivateEventRouterFactory:: | 53 bool PasswordsPrivateEventRouterFactory:: |
54 ServiceIsCreatedWithBrowserContext() const { | 54 ServiceIsCreatedWithBrowserContext() const { |
55 return true; | 55 return true; |
56 } | 56 } |
57 | 57 |
58 bool PasswordsPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const { | 58 bool PasswordsPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const { |
59 return true; | 59 return true; |
60 } | 60 } |
61 | 61 |
62 } // namespace extensions | 62 } // namespace extensions |
OLD | NEW |