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

Unified Diff: net/proxy/proxy_resolver_mojo_host.h

Issue 862813002: WIP: Prototype OOP V8 PAC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Slight cleanup and report JS memory usage. Created 5 years, 11 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
« no previous file with comments | « net/proxy/proxy_resolver_mojo.cc ('k') | net/proxy/proxy_resolver_mojo_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_mojo_host.h
diff --git a/net/proxy/proxy_resolver_mojo_host.h b/net/proxy/proxy_resolver_mojo_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..aabc7c63a879252b6d5de802e72b484c38b97c00
--- /dev/null
+++ b/net/proxy/proxy_resolver_mojo_host.h
@@ -0,0 +1,71 @@
+// 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_PROXY_RESOLVER_MOJO_HOST_H_
+#define NET_PROXY_PROXY_RESOLVER_MOJO_HOST_H_
+
+#include "base/logging.h"
+#include "base/memory/ref_counted.h"
+#include "base/strings/string16.h"
+#include "mojo/public/cpp/bindings/interface_impl.h"
+#include "net/base/completion_callback.h"
+#include "net/base/load_states.h"
+#include "net/base/net_export.h"
+#include "net/proxy/proxy_resolver.mojom.h"
+#include "net/proxy/proxy_resolver_script_data.h"
+#include "url/gurl.h"
+
+namespace net {
+
+class BoundNetLog;
+class HostResolverMojo;
+class NetLog;
+class ProxyInfo;
+class ProxyResolver;
+class ProxyResolverErrorObserverMojo;
+
+class NET_EXPORT_PRIVATE ProxyResolverMojoHost
+ : public mojo::InterfaceImpl<proxy::Resolver> {
+ public:
+ ProxyResolverMojoHost(scoped_ptr<ProxyResolver> resolver,
+ scoped_ptr<HostResolverMojo> host_resolver);
+
+ ~ProxyResolverMojoHost() override;
+
+ ProxyResolver* resolver() { return resolver_.get(); }
+
+ private:
+ void SetPacScript(const mojo::String& data,
+ proxy::SetPacScriptClientPtr client) override;
+ void GetProxyForUrl(const mojo::String& url,
+ proxy::ResolveRequestClientPtr client) override;
+
+ scoped_ptr<ProxyResolver> resolver_;
+ scoped_ptr<HostResolverMojo> host_resolver_;
+
+ base::WeakPtrFactory<ProxyResolverMojoHost> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojoHost);
+};
+
+class NET_EXPORT ProxyResolverMojoFactory
+ : public mojo::InterfaceImpl<proxy::ResolverFactory> {
+ public:
+ explicit ProxyResolverMojoFactory(NetLog* net_log);
+
+ ~ProxyResolverMojoFactory() override;
+
+ private:
+ void CreateResolver(mojo::InterfaceRequest<proxy::Resolver> resolver,
+ dns::ResolverPtr host_resolver_handle,
+ proxy::ErrorObserverPtr error_observer_handle) override;
+
+ NetLog* net_log_;
+
+ DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojoFactory);
+};
+
+} // namespace net
+
+#endif // NET_PROXY_PROXY_RESOLVER_MOJO_HOST_H_
« no previous file with comments | « net/proxy/proxy_resolver_mojo.cc ('k') | net/proxy/proxy_resolver_mojo_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698