OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_SERVICE_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_NET_CERT_DATABASE_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_NET_CERT_DATABASE_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "base/macros.h" | 8 #include "base/macros.h" |
11 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" | 9 #include "components/keyed_service/content/browser_context_keyed_service_factory
.h" |
12 | 10 |
13 template <typename T> | 11 template <typename T> |
14 struct DefaultSingletonTraits; | 12 struct DefaultSingletonTraits; |
15 | 13 |
16 class Profile; | 14 namespace cert_database { |
17 | 15 |
18 namespace chromeos { | 16 class CertDatabaseService; |
19 | 17 |
20 class PlatformKeysService; | 18 class CertDatabaseServiceFactory : public BrowserContextKeyedServiceFactory { |
21 | |
22 // Factory to create PlatformKeysService. | |
23 class PlatformKeysServiceFactory : public BrowserContextKeyedServiceFactory { | |
24 public: | 19 public: |
25 static PlatformKeysService* GetForBrowserContext( | 20 static CertDatabaseService* GetForBrowserContext( |
26 content::BrowserContext* context); | 21 content::BrowserContext* context); |
27 | 22 |
28 static PlatformKeysServiceFactory* GetInstance(); | 23 static CertDatabaseServiceFactory* GetInstance(); |
29 | 24 |
30 private: | 25 private: |
31 friend struct DefaultSingletonTraits<PlatformKeysServiceFactory>; | 26 friend struct DefaultSingletonTraits<CertDatabaseServiceFactory>; |
32 | 27 |
33 PlatformKeysServiceFactory(); | 28 CertDatabaseServiceFactory(); |
34 virtual ~PlatformKeysServiceFactory(); | 29 virtual ~CertDatabaseServiceFactory(); |
35 | 30 |
36 // BrowserContextKeyedServiceFactory: | 31 // BrowserContextKeyedServiceFactory: |
37 virtual content::BrowserContext* GetBrowserContextToUse( | 32 virtual content::BrowserContext* GetBrowserContextToUse( |
38 content::BrowserContext* context) const override; | 33 content::BrowserContext* context) const override; |
| 34 virtual bool ServiceIsCreatedWithBrowserContext() const override; |
39 virtual KeyedService* BuildServiceInstanceFor( | 35 virtual KeyedService* BuildServiceInstanceFor( |
40 content::BrowserContext* context) const override; | 36 content::BrowserContext* context) const override; |
41 | 37 |
42 DISALLOW_COPY_AND_ASSIGN(PlatformKeysServiceFactory); | 38 DISALLOW_COPY_AND_ASSIGN(CertDatabaseServiceFactory); |
43 }; | 39 }; |
44 | 40 |
45 } // namespace chromeos | 41 } // namespace cert_database |
46 | 42 |
47 #endif // CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_SERVICE_FACTORY_H
_ | 43 #endif // CHROME_BROWSER_NET_CERT_DATABASE_SERVICE_FACTORY_H_ |
OLD | NEW |