Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / chromeos / certificate_provider / certificate_provider_service_factory.h
blob6b209abbf08befd1203786098eecec6e5cb5aca1
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"
11 namespace base {
12 template <typename T>
13 struct DefaultSingletonTraits;
16 namespace content {
17 class BrowserContext;
20 namespace chromeos {
22 class CertificateProviderService;
24 // Factory to create CertificateProviderService.
25 class CertificateProviderServiceFactory
26 : public BrowserContextKeyedServiceFactory {
27 public:
28 static CertificateProviderService* GetForBrowserContext(
29 content::BrowserContext* context);
31 static CertificateProviderServiceFactory* GetInstance();
33 private:
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_