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_HTTP_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 std::vector<std::string> response_cookies_; | 101 std::vector<std::string> response_cookies_; |
102 size_t response_cookies_save_index_; | 102 size_t response_cookies_save_index_; |
103 | 103 |
104 // Auth states for proxy and origin server. | 104 // Auth states for proxy and origin server. |
105 AuthState proxy_auth_state_; | 105 AuthState proxy_auth_state_; |
106 AuthState server_auth_state_; | 106 AuthState server_auth_state_; |
107 AuthCredentials auth_credentials_; | 107 AuthCredentials auth_credentials_; |
108 | 108 |
109 OldCompletionCallbackImpl<URLRequestHttpJob> start_callback_; | 109 OldCompletionCallbackImpl<URLRequestHttpJob> start_callback_; |
110 OldCompletionCallbackImpl<URLRequestHttpJob> read_callback_; | 110 OldCompletionCallbackImpl<URLRequestHttpJob> read_callback_; |
111 OldCompletionCallbackImpl<URLRequestHttpJob> | 111 CompletionCallback notify_before_headers_sent_callback_; |
112 notify_before_headers_sent_callback_; | |
113 | 112 |
114 bool read_in_progress_; | 113 bool read_in_progress_; |
115 | 114 |
116 // An URL for an SDCH dictionary as suggested in a Get-Dictionary HTTP header. | 115 // An URL for an SDCH dictionary as suggested in a Get-Dictionary HTTP header. |
117 GURL sdch_dictionary_url_; | 116 GURL sdch_dictionary_url_; |
118 | 117 |
119 scoped_ptr<HttpTransaction> transaction_; | 118 scoped_ptr<HttpTransaction> transaction_; |
120 | 119 |
121 // This is used to supervise traffic and enforce exponential back-off. | 120 // This is used to supervise traffic and enforce exponential back-off. |
122 scoped_refptr<URLRequestThrottlerEntryInterface> throttling_entry_; | 121 scoped_refptr<URLRequestThrottlerEntryInterface> throttling_entry_; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // last time for use in histograms. | 203 // last time for use in histograms. |
205 base::Time final_packet_time_; | 204 base::Time final_packet_time_; |
206 | 205 |
207 // The start time for the job, ignoring re-starts. | 206 // The start time for the job, ignoring re-starts. |
208 base::TimeTicks start_time_; | 207 base::TimeTicks start_time_; |
209 | 208 |
210 scoped_ptr<HttpFilterContext> filter_context_; | 209 scoped_ptr<HttpFilterContext> filter_context_; |
211 ScopedRunnableMethodFactory<URLRequestHttpJob> method_factory_; | 210 ScopedRunnableMethodFactory<URLRequestHttpJob> method_factory_; |
212 base::WeakPtrFactory<URLRequestHttpJob> weak_ptr_factory_; | 211 base::WeakPtrFactory<URLRequestHttpJob> weak_ptr_factory_; |
213 | 212 |
214 OldCompletionCallbackImpl<URLRequestHttpJob> on_headers_received_callback_; | 213 CompletionCallback on_headers_received_callback_; |
215 | 214 |
216 // We allow the network delegate to modify a copy of the response headers. | 215 // We allow the network delegate to modify a copy of the response headers. |
217 // This prevents modifications of headers that are shared with the underlying | 216 // This prevents modifications of headers that are shared with the underlying |
218 // layers of the network stack. | 217 // layers of the network stack. |
219 scoped_refptr<HttpResponseHeaders> override_response_headers_; | 218 scoped_refptr<HttpResponseHeaders> override_response_headers_; |
220 | 219 |
221 // Flag used to verify that |this| is not deleted while we are awaiting | 220 // Flag used to verify that |this| is not deleted while we are awaiting |
222 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. | 221 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. |
223 // True if we are waiting a callback and | 222 // True if we are waiting a callback and |
224 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, | 223 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, |
225 // to inform the NetworkDelegate that it may not call back. | 224 // to inform the NetworkDelegate that it may not call back. |
226 bool awaiting_callback_; | 225 bool awaiting_callback_; |
227 | 226 |
228 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); | 227 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); |
229 }; | 228 }; |
230 | 229 |
231 } // namespace net | 230 } // namespace net |
232 | 231 |
233 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ | 232 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ |
OLD | NEW |