Chromium Code Reviews| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
| 13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
| 14 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
| 15 #include "net/base/net_log.h" | 15 #include "net/base/net_log.h" |
| 16 #include "net/base/upload_data_stream.h" | 16 #include "net/base/upload_data_stream.h" |
| 17 #include "net/http/http_chunked_decoder.h" | 17 #include "net/http/http_chunked_decoder.h" |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 class ClientSocketHandle; | 21 class ClientSocketHandle; |
| 22 class DrainableIOBuffer; | 22 class DrainableIOBuffer; |
| 23 class SeekableIOBuffer; | |
|
wtc
2012/02/02 20:22:57
Nit: list in alphabetical order.
satorux1
2012/02/02 22:02:27
Done.
| |
| 23 class GrowableIOBuffer; | 24 class GrowableIOBuffer; |
| 24 struct HttpRequestInfo; | 25 struct HttpRequestInfo; |
| 25 class HttpRequestHeaders; | 26 class HttpRequestHeaders; |
| 26 class HttpResponseInfo; | 27 class HttpResponseInfo; |
| 27 class IOBuffer; | 28 class IOBuffer; |
| 28 class IOBufferWithSize; | 29 class IOBufferWithSize; |
| 29 class SSLCertRequestInfo; | 30 class SSLCertRequestInfo; |
| 30 class SSLInfo; | 31 class SSLInfo; |
| 31 | 32 |
| 32 class NET_EXPORT_PRIVATE HttpStreamParser : public ChunkCallback { | 33 class NET_EXPORT_PRIVATE HttpStreamParser : public ChunkCallback { |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 216 // The underlying socket. | 217 // The underlying socket. |
| 217 ClientSocketHandle* const connection_; | 218 ClientSocketHandle* const connection_; |
| 218 | 219 |
| 219 BoundNetLog net_log_; | 220 BoundNetLog net_log_; |
| 220 | 221 |
| 221 // Callback to be used when doing IO. | 222 // Callback to be used when doing IO. |
| 222 CompletionCallback io_callback_; | 223 CompletionCallback io_callback_; |
| 223 | 224 |
| 224 // Stores an encoded chunk for chunked uploads. | 225 // Stores an encoded chunk for chunked uploads. |
| 225 // Note: This should perhaps be improved to not create copies of the data. | 226 // Note: This should perhaps be improved to not create copies of the data. |
| 226 scoped_refptr<IOBufferWithSize> raw_chunk_buf_; | 227 scoped_refptr<SeekableIOBuffer> chunk_buf_; |
| 227 // Wraps raw_chunk_buf_ to read the remaining data progressively. | |
| 228 scoped_refptr<DrainableIOBuffer> chunk_buf_; | |
| 229 size_t chunk_length_without_encoding_; | 228 size_t chunk_length_without_encoding_; |
| 230 bool sent_last_chunk_; | 229 bool sent_last_chunk_; |
| 231 | 230 |
| 232 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 231 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
| 233 }; | 232 }; |
| 234 | 233 |
| 235 } // namespace net | 234 } // namespace net |
| 236 | 235 |
| 237 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 236 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
| OLD | NEW |