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

Side by Side Diff: components/data_reduction_proxy/common/data_reduction_proxy_headers.h

Issue 387353003: Modify data_reduction_proxy_header to support tamper detection logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@work
Patch Set: Created 6 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_COMMON_DATA_REDUCTION_PROXY_HEADERS_H_ 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_COMMON_DATA_REDUCTION_PROXY_HEADERS_H_
6 #define COMPONENTS_DATA_REDUCTION_PROXY_COMMON_DATA_REDUCTION_PROXY_HEADERS_H_ 6 #define COMPONENTS_DATA_REDUCTION_PROXY_COMMON_DATA_REDUCTION_PROXY_HEADERS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers); 44 bool HasDataReductionProxyViaHeader(const net::HttpResponseHeaders* headers);
45 45
46 // Returns the reason why the Chrome proxy should be bypassed or not, and 46 // Returns the reason why the Chrome proxy should be bypassed or not, and
47 // populates |proxy_info| with information on how long to bypass if 47 // populates |proxy_info| with information on how long to bypass if
48 // applicable. 48 // applicable.
49 net::ProxyService::DataReductionProxyBypassEventType 49 net::ProxyService::DataReductionProxyBypassEventType
50 GetDataReductionProxyBypassEventType( 50 GetDataReductionProxyBypassEventType(
51 const net::HttpResponseHeaders* headers, 51 const net::HttpResponseHeaders* headers,
52 DataReductionProxyInfo* proxy_info); 52 DataReductionProxyInfo* proxy_info);
53 53
54 // Searches for the specified Chrome-Proxy action, and if present saves its
55 // value as a string in |action_value|. Only keeps the first one and ignores
56 // the rest if multiple actions matches |action_prefix|.
bengr 2014/07/14 18:27:14 match
bolian 2014/07/14 19:23:59 Document return value.
xingx 2014/07/14 21:37:17 Done.
xingx 2014/07/14 21:37:17 Acknowledged.
57 bool GetDataReductionProxyActionValue(
58 const net::HttpResponseHeaders* headers,
59 const std::string& action_prefix,
60 std::string* action_value);
61
54 // Searches for the specified Chrome-Proxy action, and if present interprets 62 // Searches for the specified Chrome-Proxy action, and if present interprets
55 // its value as a duration in seconds. 63 // its value as a duration in seconds.
56 bool GetDataReductionProxyBypassDuration( 64 bool GetDataReductionProxyBypassDuration(
57 const net::HttpResponseHeaders* headers, 65 const net::HttpResponseHeaders* headers,
58 const std::string& action_prefix, 66 const std::string& action_prefix,
59 base::TimeDelta* duration); 67 base::TimeDelta* duration);
60 68
61 } // namespace data_reduction_proxy 69 } // namespace data_reduction_proxy
62 #endif // COMPONENTS_DATA_REDUCTION_PROXY_COMMON_DATA_REDUCTION_PROXY_HEADERS_H _ 70 #endif // COMPONENTS_DATA_REDUCTION_PROXY_COMMON_DATA_REDUCTION_PROXY_HEADERS_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698