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_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 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 // after everything else is done. When it is time to issue the client | 182 // after everything else is done. When it is time to issue the client |
183 // callback, move it from |user_callback_| to |scheduled_callback_|. | 183 // callback, move it from |user_callback_| to |scheduled_callback_|. |
184 OldCompletionCallback* scheduled_callback_; | 184 OldCompletionCallback* scheduled_callback_; |
185 | 185 |
186 // The underlying socket. | 186 // The underlying socket. |
187 ClientSocketHandle* const connection_; | 187 ClientSocketHandle* const connection_; |
188 | 188 |
189 BoundNetLog net_log_; | 189 BoundNetLog net_log_; |
190 | 190 |
191 // Callback to be used when doing IO. | 191 // Callback to be used when doing IO. |
192 OldCompletionCallbackImpl<HttpStreamParser> io_callback_; | 192 CompletionCallback io_callback_; |
193 | 193 |
194 // Stores an encoded chunk for chunked uploads. | 194 // Stores an encoded chunk for chunked uploads. |
195 // Note: This should perhaps be improved to not create copies of the data. | 195 // Note: This should perhaps be improved to not create copies of the data. |
196 scoped_refptr<IOBuffer> chunk_buf_; | 196 scoped_refptr<IOBuffer> chunk_buf_; |
197 size_t chunk_length_; | 197 size_t chunk_length_; |
198 size_t chunk_length_without_encoding_; | 198 size_t chunk_length_without_encoding_; |
199 bool sent_last_chunk_; | 199 bool sent_last_chunk_; |
200 | 200 |
201 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 201 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
202 }; | 202 }; |
203 | 203 |
204 } // namespace net | 204 } // namespace net |
205 | 205 |
206 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 206 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
OLD | NEW |