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

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

Issue 338483002: Chrome Participated Tamper Detect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed most of comments 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"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "net/http/http_response_headers.h" 12 #include "net/http/http_response_headers.h"
13 #include "net/proxy/proxy_service.h" 13 #include "net/proxy/proxy_service.h"
14 14
15 namespace data_reduction_proxy { 15 namespace data_reduction_proxy {
16 16
17 // Data Reduction Proxy's Via header tag.
18 extern const char* kDataReductionProxyViaValues[];
19
17 // Contains instructions contained in the Chrome-Proxy header. 20 // Contains instructions contained in the Chrome-Proxy header.
18 struct DataReductionProxyInfo { 21 struct DataReductionProxyInfo {
19 DataReductionProxyInfo() : bypass_all(false) {} 22 DataReductionProxyInfo() : bypass_all(false) {}
20 23
21 // True if Chrome should bypass all available data reduction proxies. False 24 // True if Chrome should bypass all available data reduction proxies. False
22 // if only the currently connected data reduction proxy should be bypassed. 25 // if only the currently connected data reduction proxy should be bypassed.
23 bool bypass_all; 26 bool bypass_all;
24 27
25 // Amount of time to bypass the data reduction proxy or proxies. 28 // Amount of time to bypass the data reduction proxy or proxies.
26 base::TimeDelta bypass_duration; 29 base::TimeDelta bypass_duration;
(...skipping 23 matching lines...) Expand all
50 53
51 // Searches for the specified Chrome-Proxy action, and if present interprets 54 // Searches for the specified Chrome-Proxy action, and if present interprets
52 // its value as a duration in seconds. 55 // its value as a duration in seconds.
53 bool GetDataReductionProxyBypassDuration( 56 bool GetDataReductionProxyBypassDuration(
54 const net::HttpResponseHeaders* headers, 57 const net::HttpResponseHeaders* headers,
55 const std::string& action_prefix, 58 const std::string& action_prefix,
56 base::TimeDelta* duration); 59 base::TimeDelta* duration);
57 60
58 } // namespace data_reduction_proxy 61 } // namespace data_reduction_proxy
59 #endif // COMPONENTS_DATA_REDUCTION_PROXY_COMMON_DATA_REDUCTION_PROXY_HEADERS_H _ 62 #endif // COMPONENTS_DATA_REDUCTION_PROXY_COMMON_DATA_REDUCTION_PROXY_HEADERS_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698