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

Side by Side Diff: net/proxy/in_process_mojo_proxy_resolver_factory.h

Issue 1076083002: Shut down proxy resolver utility processes when no longer needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@proxy-service-with-factory-restart
Patch Set: Created 5 years, 7 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
« no previous file with comments | « net/net.gyp ('k') | net/proxy/in_process_mojo_proxy_resolver_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 NET_PROXY_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_ 5 #ifndef NET_PROXY_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_
6 #define NET_PROXY_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_ 6 #define NET_PROXY_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "net/interfaces/proxy_resolver_service.mojom.h" 9 #include "net/proxy/mojo_proxy_resolver_factory.h"
10 10
11 template <typename T> 11 template <typename T>
12 struct DefaultSingletonTraits; 12 struct DefaultSingletonTraits;
13 13
14 namespace net { 14 namespace net {
15 15
16 // Factory to connect to an in-process Mojo proxy resolver service. 16 // Factory to connect to an in-process Mojo proxy resolver service.
17 // NOTE: This is intended to be temporary for debugging purposes and will be 17 // NOTE: This is intended to be temporary for debugging purposes and will be
18 // removed when we're confident with the out-of-process implementation. 18 // removed when we're confident with the out-of-process implementation.
19 class InProcessMojoProxyResolverFactory 19 class InProcessMojoProxyResolverFactory : public MojoProxyResolverFactory {
20 : public interfaces::ProxyResolverFactory {
21 public: 20 public:
22 static InProcessMojoProxyResolverFactory* GetInstance(); 21 static InProcessMojoProxyResolverFactory* GetInstance();
23 22
24 // Overridden from interfaces::ProxyResolverFactory: 23 // Overridden from MojoProxyResolverFactory:
25 void CreateResolver( 24 scoped_ptr<base::ScopedClosureRunner> CreateResolver(
26 const mojo::String& pac_script, 25 const mojo::String& pac_script,
27 mojo::InterfaceRequest<interfaces::ProxyResolver> req, 26 mojo::InterfaceRequest<interfaces::ProxyResolver> req,
28 interfaces::HostResolverPtr host_resolver, 27 interfaces::HostResolverPtr host_resolver,
29 interfaces::ProxyResolverFactoryRequestClientPtr client) override; 28 interfaces::ProxyResolverFactoryRequestClientPtr client) override;
30 29
31 private: 30 private:
32 InProcessMojoProxyResolverFactory(); 31 InProcessMojoProxyResolverFactory();
33 ~InProcessMojoProxyResolverFactory() override; 32 ~InProcessMojoProxyResolverFactory() override;
34 friend struct DefaultSingletonTraits<InProcessMojoProxyResolverFactory>; 33 friend struct DefaultSingletonTraits<InProcessMojoProxyResolverFactory>;
35 34
36 interfaces::ProxyResolverFactoryPtr factory_; 35 interfaces::ProxyResolverFactoryPtr factory_;
37 36
38 DISALLOW_COPY_AND_ASSIGN(InProcessMojoProxyResolverFactory); 37 DISALLOW_COPY_AND_ASSIGN(InProcessMojoProxyResolverFactory);
39 }; 38 };
40 39
41 } // namespace net 40 } // namespace net
42 41
43 #endif // NET_PROXY_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_ 42 #endif // NET_PROXY_IN_PROCESS_MOJO_PROXY_RESOLVER_FACTORY_H_
OLDNEW
« no previous file with comments | « net/net.gyp ('k') | net/proxy/in_process_mojo_proxy_resolver_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698