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 #ifndef CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DELEGA
TE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DELEGA
TE_FACTORY_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DELEGA
TE_FACTORY_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DELEGA
TE_FACTORY_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
10 | 10 |
11 namespace context { | 11 namespace context { |
12 class BrowserContext; | 12 class BrowserContext; |
13 } | 13 } |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 class PasswordsPrivateDelegate; | 16 class PasswordsPrivateDelegate; |
17 | 17 |
18 // Factory for creating PasswordPrivateDelegates. | 18 // Factory for creating PasswordPrivateDelegates. |
19 class PasswordsPrivateDelegateFactory | 19 class PasswordsPrivateDelegateFactory |
20 : public BrowserContextKeyedServiceFactory { | 20 : public BrowserContextKeyedServiceFactory { |
21 public: | 21 public: |
22 static PasswordsPrivateDelegate* GetForBrowserContext( | 22 static PasswordsPrivateDelegate* GetForBrowserContext( |
23 content::BrowserContext* browser_context, | 23 content::BrowserContext* browser_context, |
24 bool create); | 24 bool create); |
25 | 25 |
26 static PasswordsPrivateDelegateFactory* GetInstance(); | 26 static PasswordsPrivateDelegateFactory* GetInstance(); |
27 | 27 |
28 private: | 28 private: |
29 friend struct DefaultSingletonTraits<PasswordsPrivateDelegateFactory>; | 29 friend struct base::DefaultSingletonTraits<PasswordsPrivateDelegateFactory>; |
30 | 30 |
31 PasswordsPrivateDelegateFactory(); | 31 PasswordsPrivateDelegateFactory(); |
32 ~PasswordsPrivateDelegateFactory() override; | 32 ~PasswordsPrivateDelegateFactory() override; |
33 | 33 |
34 // BrowserContextKeyedBaseFactory implementation. | 34 // BrowserContextKeyedBaseFactory implementation. |
35 KeyedService* BuildServiceInstanceFor( | 35 KeyedService* BuildServiceInstanceFor( |
36 content::BrowserContext* profile) const override; | 36 content::BrowserContext* profile) const override; |
37 bool ServiceIsCreatedWithBrowserContext() const override; | 37 bool ServiceIsCreatedWithBrowserContext() const override; |
38 bool ServiceIsNULLWhileTesting() const override; | 38 bool ServiceIsNULLWhileTesting() const override; |
39 | 39 |
40 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateDelegateFactory); | 40 DISALLOW_COPY_AND_ASSIGN(PasswordsPrivateDelegateFactory); |
41 }; | 41 }; |
42 | 42 |
43 } // namespace extensions | 43 } // namespace extensions |
44 | 44 |
45 #endif // CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DEL
EGATE_FACTORY_H_ | 45 #endif // CHROME_BROWSER_EXTENSIONS_API_PASSWORDS_PRIVATE_PASSWORDS_PRIVATE_DEL
EGATE_FACTORY_H_ |
OLD | NEW |