| 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_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 <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "net/base/load_states.h" | 21 #include "net/base/load_states.h" |
| 22 #include "net/base/load_timing_info.h" | 22 #include "net/base/load_timing_info.h" |
| 23 #include "net/base/net_export.h" | 23 #include "net/base/net_export.h" |
| 24 #include "net/base/network_delegate.h" | 24 #include "net/base/network_delegate.h" |
| 25 #include "net/base/request_priority.h" | 25 #include "net/base/request_priority.h" |
| 26 #include "net/base/upload_progress.h" | 26 #include "net/base/upload_progress.h" |
| 27 #include "net/cookies/canonical_cookie.h" | 27 #include "net/cookies/canonical_cookie.h" |
| 28 #include "net/http/http_request_headers.h" | 28 #include "net/http/http_request_headers.h" |
| 29 #include "net/http/http_response_info.h" | 29 #include "net/http/http_response_info.h" |
| 30 #include "net/log/net_log.h" | 30 #include "net/log/net_log.h" |
| 31 #include "net/socket/connection_attempts.h" |
| 31 #include "net/url_request/url_request_status.h" | 32 #include "net/url_request/url_request_status.h" |
| 32 #include "url/gurl.h" | 33 #include "url/gurl.h" |
| 33 | 34 |
| 34 namespace base { | 35 namespace base { |
| 35 class Value; | 36 class Value; |
| 36 | 37 |
| 37 namespace debug { | 38 namespace debug { |
| 38 class StackTrace; | 39 class StackTrace; |
| 39 } // namespace debug | 40 } // namespace debug |
| 40 } // namespace base | 41 } // namespace base |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 int64 received_response_content_length() const { | 602 int64 received_response_content_length() const { |
| 602 return received_response_content_length_; | 603 return received_response_content_length_; |
| 603 } | 604 } |
| 604 | 605 |
| 605 // Available at NetworkDelegate::NotifyHeadersReceived() time, which is before | 606 // Available at NetworkDelegate::NotifyHeadersReceived() time, which is before |
| 606 // the more general response_info() is available, even though it is a subset. | 607 // the more general response_info() is available, even though it is a subset. |
| 607 const HostPortPair& proxy_server() const { | 608 const HostPortPair& proxy_server() const { |
| 608 return proxy_server_; | 609 return proxy_server_; |
| 609 } | 610 } |
| 610 | 611 |
| 612 // Gets the connection attempts made in the process of servicing this |
| 613 // URLRequest. Only guaranteed to be valid if called after the request fails |
| 614 // or after the response headers are received. |
| 615 void GetConnectionAttempts(ConnectionAttempts* out) const; |
| 616 |
| 611 protected: | 617 protected: |
| 612 // Allow the URLRequestJob class to control the is_pending() flag. | 618 // Allow the URLRequestJob class to control the is_pending() flag. |
| 613 void set_is_pending(bool value) { is_pending_ = value; } | 619 void set_is_pending(bool value) { is_pending_ = value; } |
| 614 | 620 |
| 615 // Allow the URLRequestJob class to set our status too | 621 // Allow the URLRequestJob class to set our status too |
| 616 void set_status(const URLRequestStatus& value) { status_ = value; } | 622 void set_status(const URLRequestStatus& value) { status_ = value; } |
| 617 | 623 |
| 618 // Allow the URLRequestJob to redirect this request. Returns OK if | 624 // Allow the URLRequestJob to redirect this request. Returns OK if |
| 619 // successful, otherwise an error code is returned. | 625 // successful, otherwise an error code is returned. |
| 620 int Redirect(const RedirectInfo& redirect_info); | 626 int Redirect(const RedirectInfo& redirect_info); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 | 823 |
| 818 // The proxy server used for this request, if any. | 824 // The proxy server used for this request, if any. |
| 819 HostPortPair proxy_server_; | 825 HostPortPair proxy_server_; |
| 820 | 826 |
| 821 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 827 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 822 }; | 828 }; |
| 823 | 829 |
| 824 } // namespace net | 830 } // namespace net |
| 825 | 831 |
| 826 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 832 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |