| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h
|
| index 240eed6983cc24ad9c3d434ea22cc27f30633dac..ac0eef4a1253f60cbd053e04b0dc1efdd0bc0c7d 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_request_options.h
|
| @@ -93,12 +93,14 @@ class DataReductionProxyRequestOptions {
|
| void Init();
|
|
|
| // Adds a 'Chrome-Proxy' header to |request_headers| with the data reduction
|
| - // proxy authentication credentials. Only adds this header if the provided
|
| + // proxy authentication credentials. If |is_lofi_on| is true adds the "q=low"
|
| + // directive to the header. Only adds this header if the provided
|
| // |proxy_server| is a data reduction proxy and not the data reduction proxy's
|
| - // CONNECT server. Must be called on the IO thread.
|
| + // CONNECT server.
|
| void MaybeAddRequestHeader(net::URLRequest* request,
|
| const net::ProxyServer& proxy_server,
|
| - net::HttpRequestHeaders* request_headers);
|
| + net::HttpRequestHeaders* request_headers,
|
| + bool is_lofi_on);
|
|
|
| // Adds a 'Chrome-Proxy' header to |request_headers| with the data reduction
|
| // proxy authentication credentials. Only adds this header if the provided
|
| @@ -136,7 +138,8 @@ class DataReductionProxyRequestOptions {
|
|
|
| protected:
|
| void SetHeader(const net::URLRequest* request,
|
| - net::HttpRequestHeaders* headers);
|
| + net::HttpRequestHeaders* headers,
|
| + bool is_lofi_on);
|
|
|
| // Returns a UTF16 string that's the hash of the configured authentication
|
| // |key| and |salt|. Returns an empty UTF16 string if no key is configured or
|
| @@ -172,7 +175,7 @@ class DataReductionProxyRequestOptions {
|
| void UpdateVersion();
|
|
|
| // May regenerate the Chrome Proxy header based on changes in Lo-Fi status.
|
| - void MayRegenerateHeaderBasedOnLoFi(const net::URLRequest* request);
|
| + void MayRegenerateHeaderBasedOnLoFi(bool is_lofi_on);
|
|
|
| // Update the value of the experiments to be run and regenerate the header if
|
| // necessary.
|
| @@ -190,11 +193,13 @@ class DataReductionProxyRequestOptions {
|
| // 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.
|
| + // reduction proxy for HTTP traffic. If |is_lofi_on| is true adds the "q=low"
|
| + // directive to the header.
|
| void MaybeAddRequestHeaderImpl(const net::URLRequest* request,
|
| const net::HostPortPair& proxy_server,
|
| bool expect_ssl,
|
| - net::HttpRequestHeaders* request_headers);
|
| + net::HttpRequestHeaders* request_headers,
|
| + bool is_lofi_on);
|
|
|
| // Regenerates the |header_value_| string which is concatenated to the
|
| // Chrome-proxy header.
|
|
|