Chromium Code Reviews| Index: components/data_reduction_proxy/common/data_reduction_proxy_headers.h |
| diff --git a/components/data_reduction_proxy/common/data_reduction_proxy_headers.h b/components/data_reduction_proxy/common/data_reduction_proxy_headers.h |
| index 50aea244124d426967e822902758c962a8cebabe..d3899bd64869d4a51e886e5bc7821f0b6e0c69e1 100644 |
| --- a/components/data_reduction_proxy/common/data_reduction_proxy_headers.h |
| +++ b/components/data_reduction_proxy/common/data_reduction_proxy_headers.h |
| @@ -16,6 +16,11 @@ using net::ProxyService; |
| namespace data_reduction_proxy { |
| +extern const char kChromeProxyActionFingerprintChromeProxy[]; |
| +extern const char kChromeProxyActionFingerprintVia[]; |
| +extern const char kChromeProxyActionFingerprintOtherHeaders[]; |
| +extern const char kChromeProxyActionFingerprintContentLength[]; |
| + |
| // Contains instructions contained in the Chrome-Proxy header. |
| struct DataReductionProxyInfo { |
| DataReductionProxyInfo() : bypass_all(false) {} |
| @@ -39,8 +44,12 @@ bool GetDataReductionProxyInfo( |
| DataReductionProxyInfo* proxy_info); |
| // Returns true if the response contain the data reduction proxy Via header |
|
bengr
2014/07/29 17:50:28
contains
xingx1
2014/07/30 03:32:56
Done.
|
| -// value. Used to check the integrity of data reduction proxy responses. |
| -bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers); |
| +// value. If non-NULL, sets |has_intermediary| to true if another server added |
| +// a Via header after the data reduction proxy, and to false otherwise. Used to |
| +// check the integrity of data reduction proxy responses and whether there are |
| +// other middleboxes between data reduction proxy and chrome. |
|
bengr
2014/07/29 17:50:28
data --> the data
chrome --> the client
xingx1
2014/07/30 03:32:56
Done.
|
| +bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers, |
| + bool* has_intermediary); |
| // Returns the reason why the Chrome proxy should be bypassed or not, and |
| // populates |proxy_info| with information on how long to bypass if |
| @@ -49,6 +58,14 @@ ProxyService::DataReductionProxyBypassType GetDataReductionProxyBypassType( |
| const net::HttpResponseHeaders* headers, |
| DataReductionProxyInfo* proxy_info); |
| +// Searches for the specified Chrome-Proxy action, and if present saves its |
| +// value as a string in |action_value|. Only returns the first one and ignores |
| +// the rest if multiple actions match |action_prefix|. |
| +bool GetDataReductionProxyActionValue( |
| + const net::HttpResponseHeaders* headers, |
| + const std::string& action_prefix, |
| + std::string* action_value); |
| + |
| // Searches for the specified Chrome-Proxy action, and if present interprets |
| // its value as a duration in seconds. |
| bool GetDataReductionProxyBypassDuration( |