Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_ | |
| 6 #define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_ | |
| 7 | |
| 8 #include "base/callback.h" | |
| 9 #include "net/interfaces/proxy_resolver_service.mojom.h" | |
| 10 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h" | |
| 11 | |
| 12 namespace net { | |
| 13 class HostResolver; | |
| 14 class ProxyResolver; | |
| 15 | |
| 16 class MojoProxyResolverFactory : public interfaces::ProxyResolverFactory { | |
|
Anand Mistry (off Chromium)
2015/02/16 06:46:15
Shouldn't this be MojoProxyResolverFactoryImpl to
Sam McNally
2015/02/17 00:00:57
Done.
| |
| 17 public: | |
| 18 using Factory = base::Callback<scoped_ptr<ProxyResolver>(HostResolver*)>; | |
| 19 | |
| 20 explicit MojoProxyResolverFactory( | |
| 21 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request); | |
| 22 MojoProxyResolverFactory( | |
| 23 const Factory& proxy_resolver_factory, | |
| 24 mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request); | |
| 25 | |
| 26 ~MojoProxyResolverFactory() override; | |
| 27 | |
| 28 private: | |
| 29 // interfaces::ProxyResolverFactory override. | |
| 30 void CreateResolver(mojo::InterfaceRequest<interfaces::ProxyResolver> request, | |
| 31 interfaces::HostResolverPtr host_resolver) override; | |
| 32 | |
| 33 const Factory proxy_resolver_impl_factory_; | |
| 34 mojo::StrongBinding<interfaces::ProxyResolverFactory> binding_; | |
| 35 | |
| 36 DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverFactory); | |
| 37 }; | |
| 38 | |
| 39 } // namespace net | |
| 40 | |
| 41 #endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_ | |
| OLD | NEW |