OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_FACTO
RY_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_FACTO
RY_H_ |
6 #define EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_FACTO
RY_H_ | 6 #define EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_FACTO
RY_H_ |
7 | 7 |
8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.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 class BrowserContext; | 12 class BrowserContext; |
13 } // namespace content | 13 } // namespace content |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 class NetworkingConfigService; | 16 class NetworkingConfigService; |
17 | 17 |
18 class NetworkingConfigServiceFactory | 18 class NetworkingConfigServiceFactory |
19 : public BrowserContextKeyedServiceFactory { | 19 : public BrowserContextKeyedServiceFactory { |
20 public: | 20 public: |
21 static NetworkingConfigService* GetForBrowserContext( | 21 static NetworkingConfigService* GetForBrowserContext( |
22 content::BrowserContext* context); | 22 content::BrowserContext* context); |
23 | 23 |
24 static NetworkingConfigServiceFactory* GetInstance(); | 24 static NetworkingConfigServiceFactory* GetInstance(); |
25 | 25 |
26 private: | 26 private: |
27 friend struct DefaultSingletonTraits<NetworkingConfigServiceFactory>; | 27 friend struct base::DefaultSingletonTraits<NetworkingConfigServiceFactory>; |
28 | 28 |
29 NetworkingConfigServiceFactory(); | 29 NetworkingConfigServiceFactory(); |
30 ~NetworkingConfigServiceFactory() override; | 30 ~NetworkingConfigServiceFactory() override; |
31 | 31 |
32 // BrowserContextKeyedBaseFactory | 32 // BrowserContextKeyedBaseFactory |
33 KeyedService* BuildServiceInstanceFor( | 33 KeyedService* BuildServiceInstanceFor( |
34 content::BrowserContext* context) const override; | 34 content::BrowserContext* context) const override; |
35 content::BrowserContext* GetBrowserContextToUse( | 35 content::BrowserContext* GetBrowserContextToUse( |
36 content::BrowserContext* context) const override; | 36 content::BrowserContext* context) const override; |
37 }; | 37 }; |
38 | 38 |
39 } // namespace extensions | 39 } // namespace extensions |
40 | 40 |
41 #endif // EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_FA
CTORY_H_ | 41 #endif // EXTENSIONS_BROWSER_API_NETWORKING_CONFIG_NETWORKING_CONFIG_SERVICE_FA
CTORY_H_ |
OLD | NEW |