Roll src/third_party/WebKit a3b4a2e:7441784 (svn 202551:202552)
[chromium-blink-merge.git] / extensions / browser / api / vpn_provider / vpn_service_factory.h
bloba343602ad5c83b3b78d54c0472df2fb4c8172a6c
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"
11 namespace content {
13 class BrowserContext;
15 } // namespace content
17 namespace base {
18 template <typename T>
19 struct DefaultSingletonTraits;
22 namespace chromeos {
24 class VpnService;
26 // Factory to create VpnService.
27 class VpnServiceFactory : public BrowserContextKeyedServiceFactory {
28 public:
29 static VpnService* GetForBrowserContext(content::BrowserContext* context);
30 static VpnServiceFactory* GetInstance();
32 private:
33 friend struct base::DefaultSingletonTraits<VpnServiceFactory>;
35 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_