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_dele
gate_factory.h" | 5 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele
gate_factory.h" |
6 | 6 |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele
gate_impl.h" | 8 #include "chrome/browser/extensions/api/passwords_private/passwords_private_dele
gate_impl.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 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 | 14 |
15 using content::BrowserContext; | 15 using content::BrowserContext; |
16 | 16 |
17 // static | 17 // static |
18 PasswordsPrivateDelegate* PasswordsPrivateDelegateFactory::GetForBrowserContext( | 18 PasswordsPrivateDelegate* PasswordsPrivateDelegateFactory::GetForBrowserContext( |
19 BrowserContext* browser_context) { | 19 BrowserContext* browser_context, |
| 20 bool create) { |
20 return static_cast<PasswordsPrivateDelegate*>( | 21 return static_cast<PasswordsPrivateDelegate*>( |
21 GetInstance()->GetServiceForBrowserContext(browser_context, true)); | 22 GetInstance()->GetServiceForBrowserContext(browser_context, create)); |
22 } | 23 } |
23 | 24 |
24 // static | 25 // static |
25 PasswordsPrivateDelegateFactory* | 26 PasswordsPrivateDelegateFactory* |
26 PasswordsPrivateDelegateFactory::GetInstance() { | 27 PasswordsPrivateDelegateFactory::GetInstance() { |
27 return Singleton<PasswordsPrivateDelegateFactory>::get(); | 28 return Singleton<PasswordsPrivateDelegateFactory>::get(); |
28 } | 29 } |
29 | 30 |
30 PasswordsPrivateDelegateFactory::PasswordsPrivateDelegateFactory() | 31 PasswordsPrivateDelegateFactory::PasswordsPrivateDelegateFactory() |
31 : BrowserContextKeyedServiceFactory( | 32 : BrowserContextKeyedServiceFactory( |
(...skipping 12 matching lines...) Expand all Loading... |
44 bool PasswordsPrivateDelegateFactory:: | 45 bool PasswordsPrivateDelegateFactory:: |
45 ServiceIsCreatedWithBrowserContext() const { | 46 ServiceIsCreatedWithBrowserContext() const { |
46 return false; | 47 return false; |
47 } | 48 } |
48 | 49 |
49 bool PasswordsPrivateDelegateFactory::ServiceIsNULLWhileTesting() const { | 50 bool PasswordsPrivateDelegateFactory::ServiceIsNULLWhileTesting() const { |
50 return false; | 51 return false; |
51 } | 52 } |
52 | 53 |
53 } // namespace extensions | 54 } // namespace extensions |
OLD | NEW |