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

Unified Diff: components/data_reduction_proxy/browser/data_reduction_proxy_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: Reworked HaveAuth 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_delegate.h
diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_delegate.h b/components/data_reduction_proxy/browser/data_reduction_proxy_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..59a8b770b8cbb9b7767750158babacf83ae21852
--- /dev/null
+++ b/components/data_reduction_proxy/browser/data_reduction_proxy_delegate.h
@@ -0,0 +1,62 @@
+// 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_DELEGATE_H_
+#define COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_DELEGATE_H_
+
+#include "components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h"
+#include "net/base/proxy_delegate.h"
+#include "url/gurl.h"
+
+namespace net {
+class HostPortPair;
+class HttpRequestHeaders;
+class HttpResponseHeaders;
+class ProxyInfo;
+class ProxyServer;
+class ProxyService;
+class URLRequest;
+}
+
+namespace data_reduction_proxy {
+
+class DataReductionProxyAuthRequestHandler;
+
+class DataReductionProxyDelegate : public net::ProxyDelegate {
+ public:
+ explicit DataReductionProxyDelegate(
+ DataReductionProxyAuthRequestHandler* auth_handler);
+
+ virtual ~DataReductionProxyDelegate();
+
+ virtual void OnResolveProxy(const GURL& url,
+ int load_flags,
+ const net::ProxyService& proxy_service,
+ net::ProxyInfo* result) OVERRIDE;
+
+ virtual void OnFallback(const net::ProxyServer& bad_proxy,
+ int net_error) OVERRIDE;
+
+ virtual void OnBeforeSendHeaders(net::URLRequest* request,
+ const net::ProxyInfo& proxy_info,
+ net::HttpRequestHeaders* headers) OVERRIDE;
+
+ virtual void OnBeforeTunnelRequest(
+ const net::HostPortPair& proxy_server,
+ net::HttpRequestHeaders* extra_headers) OVERRIDE;
+
+ virtual void OnTunnelHeadersReceived(
+ const net::HostPortPair& origin,
+ const net::HostPortPair& proxy_server,
+ const net::HttpResponseHeaders& response_headers) OVERRIDE;
+
+ private:
+ DataReductionProxyAuthRequestHandler* auth_handler_;
+
+ DISALLOW_COPY_AND_ASSIGN(DataReductionProxyDelegate);
+};
+
+} // namespace data_reduction_proxy
+
+#endif // COMPONENTS_DATA_REDUCTION_PROXY_BROWSER_DATA_REDUCTION_PROXY_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698