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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_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: components/data_reduction_proxy/browser/data_reduction_proxy_tunnel_delegate.h
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_tunnel_delegate.h b/components/data_reduction_proxy/browser/data_reduction_proxy_tunnel_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..99c53a69870c929330c5193ec525208685843eff
--- /dev/null
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_tunnel_delegate.h
@@ -0,0 +1,44 @@
+// 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 COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_TUNNEL_DELEGATE_H_
+#define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_TUNNEL_DELEGATE_H_
+
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h"
+#include "net/http/http_proxy_tunnel_delegate.h"
+
+namespace net {
+class HostPortPair;
+class HttpRequestHeaders;
+class HttpResponseHeaders;
+}
+
+namespace data_reduction_proxy {
+
+class DataReductionProxyAuthRequestHandler;
+
+class DataReductionProxyTunnelDelegate : public net::HttpProxyTunnelDelegate {
+ public:
+ explicit DataReductionProxyTunnelDelegate(
+ DataReductionProxyAuthRequestHandler* auth_handler);
+ virtual ~DataReductionProxyTunnelDelegate();
+
+ virtual void OnBeforeRequest(
+ const net::HostPortPair& proxy_server,
+ net::HttpRequestHeaders* extra_headers) OVERRIDE;
+
+ virtual void OnHeadersReceived(
+ const net::HostPortPair& origin,
+ const net::HostPortPair& proxy_server,
+ const net::HttpResponseHeaders& response_headers) OVERRIDE;
+
+ private:
+ DataReductionProxyAuthRequestHandler* auth_handler_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataReductionProxyTunnelDelegate);
+};
+
+} // namespace data_reduction_proxy
+
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_TUNNEL_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698