| 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_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SERVIC
E_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SERVIC
E_FACTORY_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SERVIC
E_FACTORY_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SERVIC
E_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 } |
| 13 | 15 |
| 14 namespace content { | 16 namespace content { |
| 15 class BrowserContext; | 17 class BrowserContext; |
| 16 } | 18 } |
| 17 | 19 |
| 18 namespace chromeos { | 20 namespace chromeos { |
| 19 | 21 |
| 20 class CertificateProviderService; | 22 class CertificateProviderService; |
| 21 | 23 |
| 22 // Factory to create CertificateProviderService. | 24 // Factory to create CertificateProviderService. |
| 23 class CertificateProviderServiceFactory | 25 class CertificateProviderServiceFactory |
| 24 : public BrowserContextKeyedServiceFactory { | 26 : public BrowserContextKeyedServiceFactory { |
| 25 public: | 27 public: |
| 26 static CertificateProviderService* GetForBrowserContext( | 28 static CertificateProviderService* GetForBrowserContext( |
| 27 content::BrowserContext* context); | 29 content::BrowserContext* context); |
| 28 | 30 |
| 29 static CertificateProviderServiceFactory* GetInstance(); | 31 static CertificateProviderServiceFactory* GetInstance(); |
| 30 | 32 |
| 31 private: | 33 private: |
| 32 friend struct DefaultSingletonTraits<CertificateProviderServiceFactory>; | 34 friend struct base::DefaultSingletonTraits<CertificateProviderServiceFactory>; |
| 33 | 35 |
| 34 CertificateProviderServiceFactory(); | 36 CertificateProviderServiceFactory(); |
| 35 | 37 |
| 36 // BrowserContextKeyedServiceFactory: | 38 // BrowserContextKeyedServiceFactory: |
| 37 content::BrowserContext* GetBrowserContextToUse( | 39 content::BrowserContext* GetBrowserContextToUse( |
| 38 content::BrowserContext* context) const override; | 40 content::BrowserContext* context) const override; |
| 39 bool ServiceIsNULLWhileTesting() const override; | 41 bool ServiceIsNULLWhileTesting() const override; |
| 40 KeyedService* BuildServiceInstanceFor( | 42 KeyedService* BuildServiceInstanceFor( |
| 41 content::BrowserContext* context) const override; | 43 content::BrowserContext* context) const override; |
| 42 | 44 |
| 43 DISALLOW_COPY_AND_ASSIGN(CertificateProviderServiceFactory); | 45 DISALLOW_COPY_AND_ASSIGN(CertificateProviderServiceFactory); |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 } // namespace chromeos | 48 } // namespace chromeos |
| 47 | 49 |
| 48 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SER
VICE_FACTORY_H_ | 50 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SER
VICE_FACTORY_H_ |
| OLD | NEW |