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/autofill_private/autofill_private_event_
router_factory.h" | 5 #include "chrome/browser/extensions/api/autofill_private/autofill_private_event_
router_factory.h" |
6 | 6 |
7 #include "chrome/browser/extensions/api/autofill_private/autofill_private_event_
router.h" | 7 #include "chrome/browser/extensions/api/autofill_private/autofill_private_event_
router.h" |
8 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 8 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
10 #include "extensions/browser/extension_system_provider.h" | 10 #include "extensions/browser/extension_system_provider.h" |
11 #include "extensions/browser/extensions_browser_client.h" | 11 #include "extensions/browser/extensions_browser_client.h" |
12 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 | 14 |
15 // static | 15 // static |
16 AutofillPrivateEventRouter* | 16 AutofillPrivateEventRouter* |
17 AutofillPrivateEventRouterFactory::GetForProfile( | 17 AutofillPrivateEventRouterFactory::GetForProfile( |
18 content::BrowserContext* context) { | 18 content::BrowserContext* context) { |
19 return static_cast<AutofillPrivateEventRouter*>( | 19 return static_cast<AutofillPrivateEventRouter*>( |
20 GetInstance()->GetServiceForBrowserContext(context, true)); | 20 GetInstance()->GetServiceForBrowserContext(context, true)); |
21 } | 21 } |
22 | 22 |
23 // static | 23 // static |
24 AutofillPrivateEventRouterFactory* | 24 AutofillPrivateEventRouterFactory* |
25 AutofillPrivateEventRouterFactory::GetInstance() { | 25 AutofillPrivateEventRouterFactory::GetInstance() { |
26 return Singleton<AutofillPrivateEventRouterFactory>::get(); | 26 return base::Singleton<AutofillPrivateEventRouterFactory>::get(); |
27 } | 27 } |
28 | 28 |
29 AutofillPrivateEventRouterFactory::AutofillPrivateEventRouterFactory() | 29 AutofillPrivateEventRouterFactory::AutofillPrivateEventRouterFactory() |
30 : BrowserContextKeyedServiceFactory( | 30 : BrowserContextKeyedServiceFactory( |
31 "AutofillPrivateEventRouter", | 31 "AutofillPrivateEventRouter", |
32 BrowserContextDependencyManager::GetInstance()) { | 32 BrowserContextDependencyManager::GetInstance()) { |
33 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); | 33 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); |
34 } | 34 } |
35 | 35 |
36 AutofillPrivateEventRouterFactory:: | 36 AutofillPrivateEventRouterFactory:: |
(...skipping 14 matching lines...) Expand all Loading... |
51 bool AutofillPrivateEventRouterFactory:: | 51 bool AutofillPrivateEventRouterFactory:: |
52 ServiceIsCreatedWithBrowserContext() const { | 52 ServiceIsCreatedWithBrowserContext() const { |
53 return true; | 53 return true; |
54 } | 54 } |
55 | 55 |
56 bool AutofillPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const { | 56 bool AutofillPrivateEventRouterFactory::ServiceIsNULLWhileTesting() const { |
57 return false; | 57 return false; |
58 } | 58 } |
59 | 59 |
60 } // namespace extensions | 60 } // namespace extensions |
OLD | NEW |