OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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_URL_REQUEST_URL_REQUEST_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 | 364 |
365 // The time at which the returned response was generated. For cached | 365 // The time at which the returned response was generated. For cached |
366 // responses, this is the last time the cache entry was validated. | 366 // responses, this is the last time the cache entry was validated. |
367 const base::Time& response_time() const { | 367 const base::Time& response_time() const { |
368 return response_info_.response_time; | 368 return response_info_.response_time; |
369 } | 369 } |
370 | 370 |
371 // Indicate if this response was fetched from disk cache. | 371 // Indicate if this response was fetched from disk cache. |
372 bool was_cached() const { return response_info_.was_cached; } | 372 bool was_cached() const { return response_info_.was_cached; } |
373 | 373 |
374 // Returns true if the URLRequest was delivered with SPDY. | 374 // True if response could use alternate protocol. However, browser will |
| 375 // ingore the alternate protocol if spdy is not enabled. |
375 bool was_fetched_via_spdy() const { | 376 bool was_fetched_via_spdy() const { |
376 return response_info_.was_fetched_via_spdy; | 377 return response_info_.was_fetched_via_spdy; |
377 } | 378 } |
378 | 379 |
379 // Returns true if the URLRequest was delivered after NPN is negotiated, | 380 // Returns true if the URLRequest was delivered after NPN is negotiated, |
380 // using either SPDY or HTTP. | 381 // using either SPDY or HTTP. |
381 bool was_npn_negotiated() const { | 382 bool was_npn_negotiated() const { |
382 return response_info_.was_npn_negotiated; | 383 return response_info_.was_npn_negotiated; |
383 } | 384 } |
384 | 385 |
| 386 // Returns true if the URLRequest was delivered when the alertnate protocol |
| 387 // is available. |
| 388 bool was_alternate_protocol_available() const { |
| 389 return response_info_.was_alternate_protocol_available; |
| 390 } |
| 391 |
385 // Returns true if the URLRequest was delivered through a proxy. | 392 // Returns true if the URLRequest was delivered through a proxy. |
386 bool was_fetched_via_proxy() const { | 393 bool was_fetched_via_proxy() const { |
387 return response_info_.was_fetched_via_proxy; | 394 return response_info_.was_fetched_via_proxy; |
388 } | 395 } |
389 | 396 |
390 // Get all response headers, as a HttpResponseHeaders object. See comments | 397 // Get all response headers, as a HttpResponseHeaders object. See comments |
391 // in HttpResponseHeaders class as to the format of the data. | 398 // in HttpResponseHeaders class as to the format of the data. |
392 net::HttpResponseHeaders* response_headers() const; | 399 net::HttpResponseHeaders* response_headers() const; |
393 | 400 |
394 // Get the SSL connection info. | 401 // Get the SSL connection info. |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
632 // The priority level for this request. Objects like ClientSocketPool use | 639 // The priority level for this request. Objects like ClientSocketPool use |
633 // this to determine which URLRequest to allocate sockets to first. | 640 // this to determine which URLRequest to allocate sockets to first. |
634 net::RequestPriority priority_; | 641 net::RequestPriority priority_; |
635 | 642 |
636 base::LeakTracker<URLRequest> leak_tracker_; | 643 base::LeakTracker<URLRequest> leak_tracker_; |
637 | 644 |
638 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 645 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
639 }; | 646 }; |
640 | 647 |
641 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 648 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |