| Index: components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h
|
| diff --git a/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h b/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h
|
| index 992b8b66e5e5d04435c02800d18ec686866f2c43..c4b2f33eb5996443d369e959d83434840772a7c8 100644
|
| --- a/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h
|
| +++ b/components/data_reduction_proxy/browser/data_reduction_proxy_auth_request_handler.h
|
| @@ -16,6 +16,7 @@ class SingleThreadTaskRunner;
|
| }
|
|
|
| namespace net {
|
| +class HostPortPair;
|
| class HttpRequestHeaders;
|
| class HttpResponseHeaders;
|
| class ProxyServer;
|
| @@ -48,11 +49,20 @@ class DataReductionProxyAuthRequestHandler {
|
|
|
| // Adds a 'Chrome-Proxy' header to |request_headers| with the data reduction
|
| // proxy authentication credentials. Only adds this header if the provided
|
| - // |proxy_server| is a data reduction proxy. Must be called on the IO thread.
|
| + // |proxy_server| is a data reduction proxy and not the data reduction proxy's
|
| + // CONNECT server. Must be called on the IO thread.
|
| void MaybeAddRequestHeader(net::URLRequest* request,
|
| const net::ProxyServer& proxy_server,
|
| net::HttpRequestHeaders* request_headers);
|
|
|
| + // Adds a 'Chrome-Proxy' header to |request_headers| with the data reduction
|
| + // proxy authentication credentials. Only adds this header if the provided
|
| + // |proxy_server| is the data reduction proxy's CONNECT server. Must be called
|
| + // on the IO thread.
|
| + void MaybeAddProxyTunnelRequestHandler(
|
| + const net::HostPortPair& proxy_server,
|
| + net::HttpRequestHeaders* request_headers);
|
| +
|
| // Sets a new authentication key. This must be called for platforms that do
|
| // not have a default key defined. See the constructor implementation for
|
| // those platforms. Must be called on the UI thread.
|
| @@ -92,6 +102,14 @@ class DataReductionProxyAuthRequestHandler {
|
| std::string* session,
|
| std::string* credentials);
|
|
|
| + // Adds authentication headers only if |expects_ssl| is true and
|
| + // |proxy_server| is a data reduction proxy used for ssl tunneling via
|
| + // HTTP CONNECT, or |expect_ssl| is false and |proxy_server| is a data
|
| + // reduction proxy for HTTP traffic.
|
| + void MaybeAddRequestHeaderImpl(const net::HostPortPair& proxy_server,
|
| + bool expect_ssl,
|
| + net::HttpRequestHeaders* request_headers);
|
| +
|
| // Authentication state.
|
| std::string key_;
|
|
|
|
|