Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: extensions/browser/api/vpn_provider/vpn_service_factory.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_ 5 #ifndef EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_
6 #define EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_ 6 #define EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 9 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class BrowserContext; 13 class BrowserContext;
14 14
15 } // namespace content 15 } // namespace content
16 16
17 namespace base {
17 template <typename T> 18 template <typename T>
18 struct DefaultSingletonTraits; 19 struct DefaultSingletonTraits;
20 }
19 21
20 namespace chromeos { 22 namespace chromeos {
21 23
22 class VpnService; 24 class VpnService;
23 25
24 // Factory to create VpnService. 26 // Factory to create VpnService.
25 class VpnServiceFactory : public BrowserContextKeyedServiceFactory { 27 class VpnServiceFactory : public BrowserContextKeyedServiceFactory {
26 public: 28 public:
27 static VpnService* GetForBrowserContext(content::BrowserContext* context); 29 static VpnService* GetForBrowserContext(content::BrowserContext* context);
28 static VpnServiceFactory* GetInstance(); 30 static VpnServiceFactory* GetInstance();
29 31
30 private: 32 private:
31 friend struct DefaultSingletonTraits<VpnServiceFactory>; 33 friend struct base::DefaultSingletonTraits<VpnServiceFactory>;
32 34
33 VpnServiceFactory(); 35 VpnServiceFactory();
34 ~VpnServiceFactory() override; 36 ~VpnServiceFactory() override;
35 37
36 // BrowserContextKeyedServiceFactory: 38 // BrowserContextKeyedServiceFactory:
37 bool ServiceIsCreatedWithBrowserContext() const override; 39 bool ServiceIsCreatedWithBrowserContext() const override;
38 bool ServiceIsNULLWhileTesting() const override; 40 bool ServiceIsNULLWhileTesting() const override;
39 KeyedService* BuildServiceInstanceFor( 41 KeyedService* BuildServiceInstanceFor(
40 content::BrowserContext* context) const override; 42 content::BrowserContext* context) const override;
41 43
42 DISALLOW_COPY_AND_ASSIGN(VpnServiceFactory); 44 DISALLOW_COPY_AND_ASSIGN(VpnServiceFactory);
43 }; 45 };
44 46
45 } // namespace chromeos 47 } // namespace chromeos
46 48
47 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_ 49 #endif // EXTENSIONS_BROWSER_API_VPN_PROVIDER_VPN_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/test/test_api.cc ('k') | extensions/browser/api/web_request/web_request_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698