OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_NETWORK_TRANSACTION_H_ | 5 #ifndef NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 6 #define NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/ref_counted.h" | 10 #include "base/ref_counted.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 // we want to throw away. The response body is typically a small error | 256 // we want to throw away. The response body is typically a small error |
257 // page just a few hundred bytes long. | 257 // page just a few hundred bytes long. |
258 enum { kDrainBodyBufferSize = 1024 }; | 258 enum { kDrainBodyBufferSize = 1024 }; |
259 | 259 |
260 // The position where status line starts; -1 if not found yet. | 260 // The position where status line starts; -1 if not found yet. |
261 int header_buf_http_offset_; | 261 int header_buf_http_offset_; |
262 | 262 |
263 // Indicates the content length remaining to read. If this value is less | 263 // Indicates the content length remaining to read. If this value is less |
264 // than zero (and chunked_decoder_ is null), then we read until the server | 264 // than zero (and chunked_decoder_ is null), then we read until the server |
265 // closes the connection. | 265 // closes the connection. |
266 int64 content_length_; | 266 int64 response_body_length_; |
267 | 267 |
268 // Keeps track of the number of response body bytes read so far. | 268 // Keeps track of the number of response body bytes read so far. |
269 int64 content_read_; | 269 int64 response_body_read_; |
270 | 270 |
271 scoped_ptr<HttpChunkedDecoder> chunked_decoder_; | 271 scoped_ptr<HttpChunkedDecoder> chunked_decoder_; |
272 | 272 |
273 // User buffer and length passed to the Read method. | 273 // User buffer and length passed to the Read method. |
274 scoped_refptr<IOBuffer> read_buf_; | 274 scoped_refptr<IOBuffer> read_buf_; |
275 int read_buf_len_; | 275 int read_buf_len_; |
276 | 276 |
277 enum State { | 277 enum State { |
278 STATE_RESOLVE_PROXY, | 278 STATE_RESOLVE_PROXY, |
279 STATE_RESOLVE_PROXY_COMPLETE, | 279 STATE_RESOLVE_PROXY_COMPLETE, |
(...skipping 17 matching lines...) Expand all Loading... |
297 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, | 297 STATE_DRAIN_BODY_FOR_AUTH_RESTART_COMPLETE, |
298 STATE_NONE | 298 STATE_NONE |
299 }; | 299 }; |
300 State next_state_; | 300 State next_state_; |
301 }; | 301 }; |
302 | 302 |
303 } // namespace net | 303 } // namespace net |
304 | 304 |
305 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ | 305 #endif // NET_HTTP_HTTP_NETWORK_TRANSACTION_H_ |
306 | 306 |
OLD | NEW |