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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SERVICE_FACTORY_H_
8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
12 struct DefaultSingletonTraits
;
20 class CertificateProviderService
;
22 // Factory to create CertificateProviderService.
23 class CertificateProviderServiceFactory
24 : public BrowserContextKeyedServiceFactory
{
26 static CertificateProviderService
* GetForBrowserContext(
27 content::BrowserContext
* context
);
29 static CertificateProviderServiceFactory
* GetInstance();
32 friend struct DefaultSingletonTraits
<CertificateProviderServiceFactory
>;
34 CertificateProviderServiceFactory();
36 // BrowserContextKeyedServiceFactory:
37 content::BrowserContext
* GetBrowserContextToUse(
38 content::BrowserContext
* context
) const override
;
39 bool ServiceIsNULLWhileTesting() const override
;
40 KeyedService
* BuildServiceInstanceFor(
41 content::BrowserContext
* context
) const override
;
43 DISALLOW_COPY_AND_ASSIGN(CertificateProviderServiceFactory
);
46 } // namespace chromeos
48 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SERVICE_FACTORY_H_