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
18 struct DefaultSingletonTraits
;
24 // Factory to create VpnService.
25 class VpnServiceFactory
: public BrowserContextKeyedServiceFactory
{
27 static VpnService
* GetForBrowserContext(content::BrowserContext
* context
);
28 static VpnServiceFactory
* GetInstance();
31 friend struct DefaultSingletonTraits
<VpnServiceFactory
>;
34 ~VpnServiceFactory() override
;
36 // BrowserContextKeyedServiceFactory:
37 bool ServiceIsCreatedWithBrowserContext() const override
;
38 bool ServiceIsNULLWhileTesting() const override
;
39 KeyedService
* BuildServiceInstanceFor(
40 content::BrowserContext
* context
) const override
;
42 DISALLOW_COPY_AND_ASSIGN(VpnServiceFactory
);
45 } // namespace chromeos
47 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_