OLD | NEW |
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_CORE_COMMON_DATA_REDUCTION_PROXY_HEADERS
_H_ | 5 #ifndef COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_HEADERS
_H_ |
6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_HEADERS
_H_ | 6 #define COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_HEADERS
_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 // Gets the directive used by the data reduction proxy to request that | 93 // Gets the directive used by the data reduction proxy to request that |
94 // a resource not be transformed. | 94 // a resource not be transformed. |
95 const char* identity_directive(); | 95 const char* identity_directive(); |
96 | 96 |
97 // Gets the Chrome-Proxy directive used by data reduction proxy lite page | 97 // Gets the Chrome-Proxy directive used by data reduction proxy lite page |
98 // preview requests and responses. | 98 // preview requests and responses. |
99 const char* chrome_proxy_lite_page_directive(); | 99 const char* chrome_proxy_lite_page_directive(); |
100 | 100 |
101 // Gets the Chrome-Proxy directive used by data reduction proxy lite page | 101 // Gets the Chrome-Proxy directive used by data reduction proxy lite page |
102 // preview experiment to ignore the blacklist. | 102 // preview experiment to force a lite page (in spite of current effective |
103 const char* chrome_proxy_lite_page_ignore_blacklist_directive(); | 103 // connection type or page lightness). |
104 | 104 const char* chrome_proxy_force_lite_page_directive(); |
105 // Requests a transformation only if the server determines that the page is | |
106 // otherwise heavy (i.e., the associated page load ordinarily requires the | |
107 // network to transfer of a lot of bytes). Added to a previews directive. E.g., | |
108 // "lite-page;if-heavy". | |
109 const char* if_heavy_qualifier(); | |
110 | 105 |
111 // Returns true if the Chrome-Proxy-Content-Transform response header indicates | 106 // Returns true if the Chrome-Proxy-Content-Transform response header indicates |
112 // that an empty image has been provided. | 107 // that an empty image has been provided. |
113 bool IsEmptyImagePreview(const net::HttpResponseHeaders& headers); | 108 bool IsEmptyImagePreview(const net::HttpResponseHeaders& headers); |
114 | 109 |
115 // Returns true if the provided value of the Chrome-Proxy-Content-Transform | 110 // Returns true if the provided value of the Chrome-Proxy-Content-Transform |
116 // response header that is provided in |content_transform_value| indicates that | 111 // response header that is provided in |content_transform_value| indicates that |
117 // an empty image has been provided. | 112 // an empty image has been provided. |
118 bool IsEmptyImagePreview(const std::string& content_transform_value, | 113 bool IsEmptyImagePreview(const std::string& content_transform_value, |
119 const std::string& chrome_proxy_value); | 114 const std::string& chrome_proxy_value); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 const net::HttpResponseHeaders* headers, | 175 const net::HttpResponseHeaders* headers, |
181 std::string* content_length_fingerprint); | 176 std::string* content_length_fingerprint); |
182 | 177 |
183 // Returns values of the Chrome-Proxy header, but with its fingerprint removed. | 178 // Returns values of the Chrome-Proxy header, but with its fingerprint removed. |
184 void GetDataReductionProxyHeaderWithFingerprintRemoved( | 179 void GetDataReductionProxyHeaderWithFingerprintRemoved( |
185 const net::HttpResponseHeaders* headers, | 180 const net::HttpResponseHeaders* headers, |
186 std::vector<std::string>* values); | 181 std::vector<std::string>* values); |
187 | 182 |
188 } // namespace data_reduction_proxy | 183 } // namespace data_reduction_proxy |
189 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_HEAD
ERS_H_ | 184 #endif // COMPONENTS_DATA_REDUCTION_PROXY_CORE_COMMON_DATA_REDUCTION_PROXY_HEAD
ERS_H_ |
OLD | NEW |