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 88b0cd054b8423d83d01beeb78fe7d0be5a6ce6d..f356df6d164681bf3949d156714aa9c63b5ede32 100644 |
--- a/components/data_reduction_proxy/common/data_reduction_proxy_headers.h |
+++ b/components/data_reduction_proxy/common/data_reduction_proxy_headers.h |
@@ -37,8 +37,12 @@ bool GetDataReductionProxyInfo( |
DataReductionProxyInfo* proxy_info); |
// Returns true if the response contain the data reduction proxy Via header |
-// value. Used to check the integrity of data reduction proxy responses. |
-bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers); |
+// value. If data reduction proxy Via header value exists, set |is_the_last| |
bengr
2014/07/16 19:23:56
I can't parse this comment. How about:
// Returns
xingx
2014/07/16 21:22:33
Done.
|
+// as whether it occurs at the last if |is_the_last| is not NULL. Used to check |
+// the integrity of data reduction proxy responses and whether there are other |
+// middleboxes between data reduction proxy and chrome. |
+bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers, |
+ bool* is_the_last); |
// Returns the reason why the Chrome proxy should be bypassed or not, and |
// populates |proxy_info| with information on how long to bypass if |
@@ -48,6 +52,14 @@ GetDataReductionProxyBypassEventType( |
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 keeps 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( |