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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_
6 #define EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_
8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
15 } // namespace content
19 struct DefaultSingletonTraits
;
26 // Factory to create VpnService.
27 class VpnServiceFactory
: public BrowserContextKeyedServiceFactory
{
29 static VpnService
* GetForBrowserContext(content::BrowserContext
* context
);
30 static VpnServiceFactory
* GetInstance();
33 friend struct base::DefaultSingletonTraits
<VpnServiceFactory
>;
36 ~VpnServiceFactory() override
;
38 // BrowserContextKeyedServiceFactory:
39 bool ServiceIsCreatedWithBrowserContext() const override
;
40 bool ServiceIsNULLWhileTesting() const override
;
41 KeyedService
* BuildServiceInstanceFor(
42 content::BrowserContext
* context
) const override
;
44 DISALLOW_COPY_AND_ASSIGN(VpnServiceFactory
);
47 } // namespace chromeos
49 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_