| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 } | 61 } |
| 62 | 62 |
| 63 namespace net { | 63 namespace net { |
| 64 | 64 |
| 65 class CookieOptions; | 65 class CookieOptions; |
| 66 class HostPortPair; | 66 class HostPortPair; |
| 67 class IOBuffer; | 67 class IOBuffer; |
| 68 struct LoadTimingInfo; | 68 struct LoadTimingInfo; |
| 69 class SSLCertRequestInfo; | 69 class SSLCertRequestInfo; |
| 70 class SSLInfo; | 70 class SSLInfo; |
| 71 class UploadDataStream; | |
| 72 class URLRequestContext; | 71 class URLRequestContext; |
| 73 class URLRequestJob; | 72 class URLRequestJob; |
| 73 class URLRequestJobFactory; |
| 74 class UploadDataStream; |
| 74 class X509Certificate; | 75 class X509Certificate; |
| 75 | 76 |
| 76 // This stores the values of the Set-Cookie headers received during the request. | 77 // This stores the values of the Set-Cookie headers received during the request. |
| 77 // Each item in the vector corresponds to a Set-Cookie: line received, | 78 // Each item in the vector corresponds to a Set-Cookie: line received, |
| 78 // excluding the "Set-Cookie:" part. | 79 // excluding the "Set-Cookie:" part. |
| 79 typedef std::vector<std::string> ResponseCookies; | 80 typedef std::vector<std::string> ResponseCookies; |
| 80 | 81 |
| 81 //----------------------------------------------------------------------------- | 82 //----------------------------------------------------------------------------- |
| 82 // A class representing the asynchronous load of a data stream from an URL. | 83 // A class representing the asynchronous load of a data stream from an URL. |
| 83 // | 84 // |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 void set_stack_trace(const base::debug::StackTrace& stack_trace); | 678 void set_stack_trace(const base::debug::StackTrace& stack_trace); |
| 678 const base::debug::StackTrace* stack_trace() const; | 679 const base::debug::StackTrace* stack_trace() const; |
| 679 | 680 |
| 680 void set_received_response_content_length(int64 received_content_length) { | 681 void set_received_response_content_length(int64 received_content_length) { |
| 681 received_response_content_length_ = received_content_length; | 682 received_response_content_length_ = received_content_length; |
| 682 } | 683 } |
| 683 int64 received_response_content_length() { | 684 int64 received_response_content_length() { |
| 684 return received_response_content_length_; | 685 return received_response_content_length_; |
| 685 } | 686 } |
| 686 | 687 |
| 688 // A custom job factory specific to this request, which will be used to |
| 689 // create a new URLRequestJob instead of request_context's job_factory |
| 690 // if non-null factory is given. |
| 691 void set_job_factory(scoped_ptr<URLRequestJobFactory> job_factory); |
| 692 URLRequestJobFactory* job_factory() { |
| 693 return job_factory_.get(); |
| 694 } |
| 695 |
| 687 protected: | 696 protected: |
| 688 // Allow the URLRequestJob class to control the is_pending() flag. | 697 // Allow the URLRequestJob class to control the is_pending() flag. |
| 689 void set_is_pending(bool value) { is_pending_ = value; } | 698 void set_is_pending(bool value) { is_pending_ = value; } |
| 690 | 699 |
| 691 // Allow the URLRequestJob class to set our status too | 700 // Allow the URLRequestJob class to set our status too |
| 692 void set_status(const URLRequestStatus& value) { status_ = value; } | 701 void set_status(const URLRequestStatus& value) { status_ = value; } |
| 693 | 702 |
| 694 // Allow the URLRequestJob to redirect this request. Returns OK if | 703 // Allow the URLRequestJob to redirect this request. Returns OK if |
| 695 // successful, otherwise an error code is returned. | 704 // successful, otherwise an error code is returned. |
| 696 int Redirect(const GURL& location, int http_status_code); | 705 int Redirect(const GURL& location, int http_status_code); |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 | 897 |
| 889 // Timing information for the most recent request. Its start times are | 898 // Timing information for the most recent request. Its start times are |
| 890 // populated during Start(), and the rest are populated in OnResponseReceived. | 899 // populated during Start(), and the rest are populated in OnResponseReceived. |
| 891 LoadTimingInfo load_timing_info_; | 900 LoadTimingInfo load_timing_info_; |
| 892 | 901 |
| 893 scoped_ptr<const base::debug::StackTrace> stack_trace_; | 902 scoped_ptr<const base::debug::StackTrace> stack_trace_; |
| 894 | 903 |
| 895 // Keeps track of whether or not OnBeforeNetworkStart has been called yet. | 904 // Keeps track of whether or not OnBeforeNetworkStart has been called yet. |
| 896 bool notified_before_network_start_; | 905 bool notified_before_network_start_; |
| 897 | 906 |
| 907 // A custom job factory. |
| 908 scoped_ptr<URLRequestJobFactory> job_factory_; |
| 909 |
| 898 DISALLOW_COPY_AND_ASSIGN(URLRequest); | 910 DISALLOW_COPY_AND_ASSIGN(URLRequest); |
| 899 }; | 911 }; |
| 900 | 912 |
| 901 } // namespace net | 913 } // namespace net |
| 902 | 914 |
| 903 #endif // NET_URL_REQUEST_URL_REQUEST_H_ | 915 #endif // NET_URL_REQUEST_URL_REQUEST_H_ |
| OLD | NEW |