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

Unified Diff: net/proxy/proxy_resolver_js_bindings.h

Issue 2833021: Add an additional per-request DNS cache when executing FindProxyForURL() from... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Address wtc's comments Created 10 years, 6 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/proxy_resolver_js_bindings.h
===================================================================
--- net/proxy/proxy_resolver_js_bindings.h (revision 50290)
+++ net/proxy/proxy_resolver_js_bindings.h (working copy)
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef NET_PROXY_PROXY_JS_BINDINGS_H
-#define NET_PROXY_PROXY_JS_BINDINGS_H
+#ifndef NET_PROXY_PROXY_RESOLVER_JS_BINDINGS_H_
+#define NET_PROXY_PROXY_RESOLVER_JS_BINDINGS_H_
#include <string>
@@ -12,10 +12,13 @@
namespace net {
class HostResolver;
+struct ProxyResolverRequestContext;
// Interface for the javascript bindings.
class ProxyResolverJSBindings {
public:
+ ProxyResolverJSBindings() : current_request_context_(NULL) {}
+
virtual ~ProxyResolverJSBindings() {}
// Handler for "alert(message)"
@@ -50,8 +53,22 @@
//
// Note that |host_resolver| will be used in sync mode mode.
static ProxyResolverJSBindings* CreateDefault(HostResolver* host_resolver);
+
+ // Sets details about the currently executing FindProxyForURL() request.
+ void set_current_request_context(
+ ProxyResolverRequestContext* current_request_context) {
+ current_request_context_ = current_request_context;
+ }
+
+ // Retrieves details about the currently executing FindProxyForURL() request.
+ ProxyResolverRequestContext* current_request_context() {
+ return current_request_context_;
+ }
+
+ private:
+ ProxyResolverRequestContext* current_request_context_;
};
} // namespace net
-#endif // NET_PROXY_PROXY_JS_BINDINGS_H
+#endif // NET_PROXY_PROXY_RESOLVER_JS_BINDINGS_H_

Powered by Google App Engine
This is Rietveld 408576698