| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 637 // the more general response_info() is available, even though it is a subset. | 637 // the more general response_info() is available, even though it is a subset. |
| 638 const HostPortPair& proxy_server() const { | 638 const HostPortPair& proxy_server() const { |
| 639 return proxy_server_; | 639 return proxy_server_; |
| 640 } | 640 } |
| 641 | 641 |
| 642 // Gets the connection attempts made in the process of servicing this | 642 // Gets the connection attempts made in the process of servicing this |
| 643 // URLRequest. Only guaranteed to be valid if called after the request fails | 643 // URLRequest. Only guaranteed to be valid if called after the request fails |
| 644 // or after the response headers are received. | 644 // or after the response headers are received. |
| 645 void GetConnectionAttempts(ConnectionAttempts* out) const; | 645 void GetConnectionAttempts(ConnectionAttempts* out) const; |
| 646 | 646 |
| 647 // Gets the over the wire raw header size of the response after https |
| 648 // encryption, 0 for cached responses. |
| 649 int raw_header_size() const { return raw_header_size_; } |
| 650 |
| 647 // Returns the error status of the request. | 651 // Returns the error status of the request. |
| 648 // Do not use! Going to be protected! | 652 // Do not use! Going to be protected! |
| 649 const URLRequestStatus& status() const { return status_; } | 653 const URLRequestStatus& status() const { return status_; } |
| 650 | |
| 651 protected: | 654 protected: |
| 652 // Allow the URLRequestJob class to control the is_pending() flag. | 655 // Allow the URLRequestJob class to control the is_pending() flag. |
| 653 void set_is_pending(bool value) { is_pending_ = value; } | 656 void set_is_pending(bool value) { is_pending_ = value; } |
| 654 | 657 |
| 655 // Allow the URLRequestJob class to set our status too. | 658 // Allow the URLRequestJob class to set our status too. |
| 656 void set_status(URLRequestStatus status); | 659 void set_status(URLRequestStatus status); |
| 657 | 660 |
| 658 // Allow the URLRequestJob to redirect this request. Returns OK if | 661 // Allow the URLRequestJob to redirect this request. Returns OK if |
| 659 // successful, otherwise an error code is returned. | 662 // successful, otherwise an error code is returned. |
| 660 int Redirect(const RedirectInfo& redirect_info); | 663 int Redirect(const RedirectInfo& redirect_info); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 845 | 848 |
| 846 base::TimeTicks creation_time_; | 849 base::TimeTicks creation_time_; |
| 847 | 850 |
| 848 // Timing information for the most recent request. Its start times are | 851 // Timing information for the most recent request. Its start times are |
| 849 // populated during Start(), and the rest are populated in OnResponseReceived. | 852 // populated during Start(), and the rest are populated in OnResponseReceived. |
| 850 LoadTimingInfo load_timing_info_; | 853 LoadTimingInfo load_timing_info_; |
| 851 | 854 |
| 852 // The proxy server used for this request, if any. | 855 // The proxy server used for this request, if any. |
| 853 HostPortPair proxy_server_; | 856 HostPortPair proxy_server_; |
| 854 | 857 |
| 858 // The raw header size of the response. |
| 859 int raw_header_size_; |
| 860 |
| 855 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 861 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 856 }; | 862 }; |
| 857 | 863 |
| 858 } // namespace net | 864 } // namespace net |
| 859 | 865 |
| 860 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 866 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |