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"
13 struct DefaultSingletonTraits
;
22 class CertificateProviderService
;
24 // Factory to create CertificateProviderService.
25 class CertificateProviderServiceFactory
26 : public BrowserContextKeyedServiceFactory
{
28 static CertificateProviderService
* GetForBrowserContext(
29 content::BrowserContext
* context
);
31 static CertificateProviderServiceFactory
* GetInstance();
34 friend struct base::DefaultSingletonTraits
<CertificateProviderServiceFactory
>;
36 CertificateProviderServiceFactory();
38 // BrowserContextKeyedServiceFactory:
39 content::BrowserContext
* GetBrowserContextToUse(
40 content::BrowserContext
* context
) const override
;
41 bool ServiceIsNULLWhileTesting() const override
;
42 KeyedService
* BuildServiceInstanceFor(
43 content::BrowserContext
* context
) const override
;
45 DISALLOW_COPY_AND_ASSIGN(CertificateProviderServiceFactory
);
48 } // namespace chromeos
50 #endif // CHROME_BROWSER_CHROMEOS_CERTIFICATE_PROVIDER_CERTIFICATE_PROVIDER_SERVICE_FACTORY_H_