OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 bool was_fetched_via_spdy() const { | 402 bool was_fetched_via_spdy() const { |
403 return response_info_.was_fetched_via_spdy; | 403 return response_info_.was_fetched_via_spdy; |
404 } | 404 } |
405 | 405 |
406 // Returns true if the URLRequest was delivered after NPN is negotiated, | 406 // Returns true if the URLRequest was delivered after NPN is negotiated, |
407 // using either SPDY or HTTP. | 407 // using either SPDY or HTTP. |
408 bool was_npn_negotiated() const { | 408 bool was_npn_negotiated() const { |
409 return response_info_.was_npn_negotiated; | 409 return response_info_.was_npn_negotiated; |
410 } | 410 } |
411 | 411 |
412 // Returns true if the URLRequest was delivered when the alternate protocol | |
413 // is available. | |
414 bool was_alternate_protocol_available() const { | |
415 return response_info_.was_alternate_protocol_available; | |
416 } | |
417 | |
418 // Returns true if the URLRequest was delivered through a proxy. | 412 // Returns true if the URLRequest was delivered through a proxy. |
419 bool was_fetched_via_proxy() const { | 413 bool was_fetched_via_proxy() const { |
420 return response_info_.was_fetched_via_proxy; | 414 return response_info_.was_fetched_via_proxy; |
421 } | 415 } |
422 | 416 |
423 // Returns the host and port that the content was fetched from. See | 417 // Returns the host and port that the content was fetched from. See |
424 // http_response_info.h for caveats relating to cached content. | 418 // http_response_info.h for caveats relating to cached content. |
425 HostPortPair GetSocketAddress() const; | 419 HostPortPair GetSocketAddress() const; |
426 | 420 |
427 // Get all response headers, as a HttpResponseHeaders object. See comments | 421 // Get all response headers, as a HttpResponseHeaders object. See comments |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 // is ready to be resumed or canceled. | 673 // is ready to be resumed or canceled. |
680 scoped_refptr< CancelableCompletionCallback<URLRequest> > | 674 scoped_refptr< CancelableCompletionCallback<URLRequest> > |
681 before_request_callback_; | 675 before_request_callback_; |
682 | 676 |
683 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 677 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
684 }; | 678 }; |
685 | 679 |
686 } // namespace net | 680 } // namespace net |
687 | 681 |
688 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 682 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
OLD | NEW |