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

Unified Diff: net/proxy/mojo_proxy_resolver_factory.h

Issue 918933002: Implement utility-side proxy resolver factory Mojo service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@host-resolver-mojo
Patch Set: rebase Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: net/proxy/mojo_proxy_resolver_factory.h
diff --git a/net/proxy/mojo_proxy_resolver_factory.h b/net/proxy/mojo_proxy_resolver_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..393f337e0019ae72ced3f15f07a5d3a2a46c8578
--- /dev/null
+++ b/net/proxy/mojo_proxy_resolver_factory.h
@@ -0,0 +1,41 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_
+#define NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_
+
+#include "base/callback.h"
+#include "net/interfaces/proxy_resolver_service.mojom.h"
+#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
+
+namespace net {
+class HostResolver;
+class ProxyResolver;
+
+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.
+ public:
+ using Factory = base::Callback<scoped_ptr<ProxyResolver>(HostResolver*)>;
+
+ explicit MojoProxyResolverFactory(
+ mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
+ MojoProxyResolverFactory(
+ const Factory& proxy_resolver_factory,
+ mojo::InterfaceRequest<interfaces::ProxyResolverFactory> request);
+
+ ~MojoProxyResolverFactory() override;
+
+ private:
+ // interfaces::ProxyResolverFactory override.
+ void CreateResolver(mojo::InterfaceRequest<interfaces::ProxyResolver> request,
+ interfaces::HostResolverPtr host_resolver) override;
+
+ const Factory proxy_resolver_impl_factory_;
+ mojo::StrongBinding<interfaces::ProxyResolverFactory> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(MojoProxyResolverFactory);
+};
+
+} // namespace net
+
+#endif // NET_PROXY_MOJO_PROXY_RESOLVER_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698