Chromium Code Reviews| 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 NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_ | 5 #ifndef NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_ |
| 6 #define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_ | 6 #define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_ |
| 7 | 7 |
| 8 #include "base/callback_helpers.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 8 #include "net/interfaces/host_resolver_service.mojom.h" | 10 #include "net/interfaces/host_resolver_service.mojom.h" |
| 9 #include "net/interfaces/proxy_resolver_service.mojom.h" | 11 #include "net/interfaces/proxy_resolver_service.mojom.h" |
| 10 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" | 12 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" |
| 11 | 13 |
| 12 namespace net { | 14 namespace net { |
| 13 | 15 |
| 14 // Factory for connecting to Mojo ProxyResolver services. | 16 // Factory for connecting to Mojo ProxyResolver services. |
| 15 class MojoProxyResolverFactory { | 17 class MojoProxyResolverFactory { |
| 16 public: | 18 public: |
| 17 // Connect to a new ProxyResolver service using request |req|, using | 19 // Connect to a new ProxyResolver service using request |req|, using |
| 18 // |host_resolver| as the DNS resolver. | 20 // |host_resolver| as the DNS resolver. The return value should be deleted |
|
eroman
2015/04/15 00:46:44
nit: deleted -> released (deleted sounds too much
Sam McNally
2015/04/15 06:04:22
Done.
| |
| 21 // when the ProxyResolver client is deleted. | |
| 19 // Note: The connection request |req| may be resolved asynchronously. | 22 // Note: The connection request |req| may be resolved asynchronously. |
| 20 virtual void Create(mojo::InterfaceRequest<interfaces::ProxyResolver> req, | 23 virtual scoped_ptr<base::ScopedClosureRunner> Create( |
| 21 interfaces::HostResolverPtr host_resolver) = 0; | 24 mojo::InterfaceRequest<interfaces::ProxyResolver> req, |
| 25 interfaces::HostResolverPtr host_resolver) = 0; | |
| 22 | 26 |
| 23 protected: | 27 protected: |
| 24 virtual ~MojoProxyResolverFactory() = default; | 28 virtual ~MojoProxyResolverFactory() = default; |
| 25 }; | 29 }; |
| 26 | 30 |
| 27 } // namespace net | 31 } // namespace net |
| 28 | 32 |
| 29 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_ | 33 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_ |
| OLD | NEW |