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

Unified Diff: net/proxy/proxy_resolver_mojo.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_error_observer_mojo_host.cc ('k') | net/proxy/proxy_resolver_mojo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/proxy/proxy_resolver_mojo.h
diff --git a/net/proxy/proxy_resolver_mojo.h b/net/proxy/proxy_resolver_mojo.h
new file mode 100644
index 0000000000000000000000000000000000000000..d012074bfe1f1e0ab9d1d69ce6bb649751844d04
--- /dev/null
+++ b/net/proxy/proxy_resolver_mojo.h
@@ -0,0 +1,56 @@
+// 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_H_
+#define NET_PROXY_PROXY_RESOLVER_MOJO_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.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 HostResolver;
+class ProxyInfo;
+
+class NET_EXPORT_PRIVATE ProxyResolverMojo : public ProxyResolver {
+ public:
+ ProxyResolverMojo(mojo::InterfacePtr<proxy::Resolver> resolver,
+ HostResolver* host_resolver);
+
+ ~ProxyResolverMojo() override;
+
+ int GetProxyForURL(const GURL& url,
+ ProxyInfo* results,
+ const net::CompletionCallback& callback,
+ RequestHandle* request,
+ const BoundNetLog& net_log) override;
+ void CancelRequest(RequestHandle request) override;
+ LoadState GetLoadState(RequestHandle request) const override;
+ void CancelSetPacScript() override;
+ int SetPacScript(const scoped_refptr<ProxyResolverScriptData>& pac_script,
+ const net::CompletionCallback& callback) override;
+
+ private:
+ class SetPacScriptJob;
+
+ mojo::InterfacePtr<proxy::Resolver> resolver_;
+ HostResolver* host_resolver_;
+ base::WeakPtr<SetPacScriptJob> set_pac_script_job_;
+
+ DISALLOW_COPY_AND_ASSIGN(ProxyResolverMojo);
+};
+
+} // namespace net
+
+#endif // NET_PROXY_PROXY_RESOLVER_MOJO_H_
« no previous file with comments | « net/proxy/proxy_resolver_error_observer_mojo_host.cc ('k') | net/proxy/proxy_resolver_mojo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698