OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 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. | |
4 | |
5 #ifndef CHROME_BROWSER_NET_PROFILE_NETWORK_CONTEXT_SERVICE_FACTORY_H_ | |
6 #define CHROME_BROWSER_NET_PROFILE_NETWORK_CONTEXT_SERVICE_FACTORY_H_ | |
7 | |
8 #include "base/macros.h" | |
9 #include "base/memory/singleton.h" | |
10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" | |
11 | |
12 class KeyedService; | |
13 class ProfileNetworkContextService; | |
14 | |
15 namespace contenet { | |
16 class BrowserContext; | |
17 } | |
18 | |
19 class ProfileNetworkContextServiceFactory | |
20 : public BrowserContextKeyedServiceFactory { | |
21 public: | |
22 // Returns the ProfileNetworkContextService that supports NetworkContexts for | |
23 // |profile|. | |
Randy Smith (Not in Mondays)
2017/07/19 19:31:11
nit: Comment doesn't match actual argument.
mmenke
2017/07/19 20:35:38
Done.
| |
24 static ProfileNetworkContextService* GetForContext( | |
25 content::BrowserContext* browser_context); | |
26 | |
27 // Returns the NetworkContextServiceFactory singleton. | |
28 static ProfileNetworkContextServiceFactory* GetInstance(); | |
29 | |
30 private: | |
31 friend struct base::DefaultSingletonTraits< | |
32 ProfileNetworkContextServiceFactory>; | |
33 | |
34 ProfileNetworkContextServiceFactory(); | |
35 ~ProfileNetworkContextServiceFactory() override; | |
36 | |
37 // BrowserContextKeyedServiceFactory implementation: | |
38 KeyedService* BuildServiceInstanceFor( | |
39 content::BrowserContext* profile) const override; | |
40 content::BrowserContext* GetBrowserContextToUse( | |
41 content::BrowserContext* context) const override; | |
42 | |
43 DISALLOW_COPY_AND_ASSIGN(ProfileNetworkContextServiceFactory); | |
44 }; | |
45 | |
46 #endif // CHROME_BROWSER_NET_PROFILE_NETWORK_CONTEXT_SERVICE_FACTORY_H_ | |
OLD | NEW |