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_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_SERVICE_FACTORY_H_ |
6 #define CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_SERVICE_FACTORY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_SERVICE_FACTORY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.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 base { |
11 template <typename T> | 12 template <typename T> |
12 struct DefaultSingletonTraits; | 13 struct DefaultSingletonTraits; |
| 14 } // namespace base |
13 | 15 |
14 namespace chromeos { | 16 namespace chromeos { |
15 | 17 |
16 class PlatformKeysService; | 18 class PlatformKeysService; |
17 | 19 |
18 // Factory to create PlatformKeysService. | 20 // Factory to create PlatformKeysService. |
19 class PlatformKeysServiceFactory : public BrowserContextKeyedServiceFactory { | 21 class PlatformKeysServiceFactory : public BrowserContextKeyedServiceFactory { |
20 public: | 22 public: |
21 static PlatformKeysService* GetForBrowserContext( | 23 static PlatformKeysService* GetForBrowserContext( |
22 content::BrowserContext* context); | 24 content::BrowserContext* context); |
23 | 25 |
24 static PlatformKeysServiceFactory* GetInstance(); | 26 static PlatformKeysServiceFactory* GetInstance(); |
25 | 27 |
26 private: | 28 private: |
27 friend struct DefaultSingletonTraits<PlatformKeysServiceFactory>; | 29 friend struct base::DefaultSingletonTraits<PlatformKeysServiceFactory>; |
28 | 30 |
29 PlatformKeysServiceFactory(); | 31 PlatformKeysServiceFactory(); |
30 ~PlatformKeysServiceFactory() override; | 32 ~PlatformKeysServiceFactory() override; |
31 | 33 |
32 // BrowserContextKeyedServiceFactory: | 34 // BrowserContextKeyedServiceFactory: |
33 content::BrowserContext* GetBrowserContextToUse( | 35 content::BrowserContext* GetBrowserContextToUse( |
34 content::BrowserContext* context) const override; | 36 content::BrowserContext* context) const override; |
35 KeyedService* BuildServiceInstanceFor( | 37 KeyedService* BuildServiceInstanceFor( |
36 content::BrowserContext* context) const override; | 38 content::BrowserContext* context) const override; |
37 | 39 |
38 DISALLOW_COPY_AND_ASSIGN(PlatformKeysServiceFactory); | 40 DISALLOW_COPY_AND_ASSIGN(PlatformKeysServiceFactory); |
39 }; | 41 }; |
40 | 42 |
41 } // namespace chromeos | 43 } // namespace chromeos |
42 | 44 |
43 #endif // CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_SERVICE_FACTORY_H
_ | 45 #endif // CHROME_BROWSER_CHROMEOS_PLATFORM_KEYS_PLATFORM_KEYS_SERVICE_FACTORY_H
_ |
OLD | NEW |