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

Unified Diff: net/http/http_proxy_tunnel_delegate.h

Issue 517693002: Add embedder-specific headers to HTTP CONNECT tunnel request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added receive notification and test Created 6 years, 3 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/http/http_proxy_tunnel_delegate.h
diff --git a/net/http/http_proxy_tunnel_delegate.h b/net/http/http_proxy_tunnel_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba7979f2eb0273ef13aa08ee6d18cc6f529bbb1f
--- /dev/null
+++ b/net/http/http_proxy_tunnel_delegate.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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_HTTP_HTTP_PROXY_TUNNEL_DELEGATE_H_
+#define NET_HTTP_HTTP_PROXY_TUNNEL_DELEGATE_H_
+
+#include "net/base/net_export.h"
+
+namespace net {
+
+class HttpRequestHeaders;
+class HttpResponseHeaders;
+class HostPortPair;
+
+// Delegate for requests to set up an HTTPS tunnel using the HTTP CONNECT
+// method.
+class NET_EXPORT HttpProxyTunnelDelegate {
+ public:
+ // Called immediately before a proxy tunnel request is sent.
+ // Provides the embedder an opportunity to add extra request headers.
mef 2014/09/05 17:22:51 Would it make sense to comment on parameters here
+ virtual void OnBeforeRequest(const HostPortPair& proxy_server,
+ HttpRequestHeaders* extra_headers) = 0;
+
+ // Called after the response headers for the tunnel request are received.
+ virtual void OnHeadersReceived(
+ const HostPortPair& origin,
+ const HostPortPair& proxy_server,
+ const HttpResponseHeaders& response_headers) = 0;
+};
+
+}
+
+#endif // NET_HTTP_HTTP_PROXY_TUNNEL_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698