| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 5 #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
| 6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 base::TimeDelta bypass_duration; | 265 base::TimeDelta bypass_duration; |
| 266 }; | 266 }; |
| 267 | 267 |
| 268 // Returns true if the Chrome-Proxy header is present and contains a bypass | 268 // Returns true if the Chrome-Proxy header is present and contains a bypass |
| 269 // delay. Sets |proxy_info->bypass_duration| to the specified delay if greater | 269 // delay. Sets |proxy_info->bypass_duration| to the specified delay if greater |
| 270 // than 0, and to 0 otherwise to indicate that the default proxy delay | 270 // than 0, and to 0 otherwise to indicate that the default proxy delay |
| 271 // (as specified in |ProxyList::UpdateRetryInfoOnFallback|) should be used. | 271 // (as specified in |ProxyList::UpdateRetryInfoOnFallback|) should be used. |
| 272 // If all available Chrome proxies should by bypassed, |bypass_all| is set to | 272 // If all available Chrome proxies should by bypassed, |bypass_all| is set to |
| 273 // true. |proxy_info| must be non-NULL. | 273 // true. |proxy_info| must be non-NULL. |
| 274 bool GetChromeProxyInfo(ChromeProxyInfo* proxy_info) const; | 274 bool GetChromeProxyInfo(ChromeProxyInfo* proxy_info) const; |
| 275 |
| 276 // Returns true if response headers contain the Chrome proxy Via header value. |
| 277 bool IsChromeProxyResponse() const; |
| 275 #endif | 278 #endif |
| 276 | 279 |
| 277 // Creates a Value for use with the NetLog containing the response headers. | 280 // Creates a Value for use with the NetLog containing the response headers. |
| 278 base::Value* NetLogCallback(NetLog::LogLevel log_level) const; | 281 base::Value* NetLogCallback(NetLog::LogLevel log_level) const; |
| 279 | 282 |
| 280 // Takes in a Value created by the above function, and attempts to create a | 283 // Takes in a Value created by the above function, and attempts to create a |
| 281 // copy of the original headers. Returns true on success. On failure, | 284 // copy of the original headers. Returns true on success. On failure, |
| 282 // clears |http_response_headers|. | 285 // clears |http_response_headers|. |
| 283 // TODO(mmenke): Long term, we want to remove this, and migrate external | 286 // TODO(mmenke): Long term, we want to remove this, and migrate external |
| 284 // consumers to be NetworkDelegates. | 287 // consumers to be NetworkDelegates. |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 402 |
| 400 // The parsed http version number (not normalized). | 403 // The parsed http version number (not normalized). |
| 401 HttpVersion parsed_http_version_; | 404 HttpVersion parsed_http_version_; |
| 402 | 405 |
| 403 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); | 406 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); |
| 404 }; | 407 }; |
| 405 | 408 |
| 406 } // namespace net | 409 } // namespace net |
| 407 | 410 |
| 408 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 411 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
| OLD | NEW |