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_HTTP_HTTP_STREAM_PARSER_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_PARSER_H_ |
6 #define NET_HTTP_HTTP_STREAM_PARSER_H_ | 6 #define NET_HTTP_HTTP_STREAM_PARSER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 // -1 if not found yet. | 216 // -1 if not found yet. |
217 int response_header_start_offset_; | 217 int response_header_start_offset_; |
218 | 218 |
219 // The amount of received data. If connection is reused then intermediate | 219 // The amount of received data. If connection is reused then intermediate |
220 // value may be bigger than final. | 220 // value may be bigger than final. |
221 int64_t received_bytes_; | 221 int64_t received_bytes_; |
222 | 222 |
223 // The amount of sent data. | 223 // The amount of sent data. |
224 int64_t sent_bytes_; | 224 int64_t sent_bytes_; |
225 | 225 |
226 // The parsed response headers. Owned by the caller of SendRequest. This | 226 // The parsed response headers. Owned by the caller of SendRequest. |
227 // cannot be safely accessed after reading the final set of headers, as the | |
228 // caller of SendRequest may have been destroyed - this happens in the case an | |
229 // HttpResponseBodyDrainer is used. | |
230 HttpResponseInfo* response_; | 227 HttpResponseInfo* response_; |
231 | 228 |
232 // Indicates the content length. If this value is less than zero | 229 // Indicates the content length. If this value is less than zero |
233 // (and chunked_decoder_ is null), then we must read until the server | 230 // (and chunked_decoder_ is null), then we must read until the server |
234 // closes the connection. | 231 // closes the connection. |
235 int64_t response_body_length_; | 232 int64_t response_body_length_; |
236 | 233 |
237 // Keep track of the number of response body bytes read so far. | 234 // Keep track of the number of response body bytes read so far. |
238 int64_t response_body_read_; | 235 int64_t response_body_read_; |
239 | 236 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 int upload_error_; | 270 int upload_error_; |
274 | 271 |
275 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; | 272 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; |
276 | 273 |
277 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 274 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
278 }; | 275 }; |
279 | 276 |
280 } // namespace net | 277 } // namespace net |
281 | 278 |
282 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 279 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
OLD | NEW |