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 <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 // The request to send. | 171 // The request to send. |
172 const HttpRequestInfo* request_; | 172 const HttpRequestInfo* request_; |
173 | 173 |
174 // The request header data. | 174 // The request header data. |
175 scoped_refptr<DrainableIOBuffer> request_headers_; | 175 scoped_refptr<DrainableIOBuffer> request_headers_; |
176 | 176 |
177 // Temporary buffer for reading. | 177 // Temporary buffer for reading. |
178 scoped_refptr<GrowableIOBuffer> read_buf_; | 178 scoped_refptr<GrowableIOBuffer> read_buf_; |
179 | 179 |
180 // Offset of the first unused byte in |read_buf_|. May be nonzero due to | 180 // Offset of the first unused byte in |read_buf_|. May be nonzero due to |
181 // a 1xx header, or body data in the same packet as header data. | 181 // body data in the same packet as header data but is zero when reading |
182 // headers. | |
182 int read_buf_unused_offset_; | 183 int read_buf_unused_offset_; |
SkyLined
2013/09/30 18:27:47
This may be a stretch, but since this is only used
agl
2013/09/30 20:59:28
I haven't done this for the following reasons:
1)
| |
183 | 184 |
184 // The amount beyond |read_buf_unused_offset_| where the status line starts; | 185 // The amount beyond |read_buf_unused_offset_| where the status line starts; |
185 // -1 if not found yet. | 186 // -1 if not found yet. |
186 int response_header_start_offset_; | 187 int response_header_start_offset_; |
187 | 188 |
188 // The parsed response headers. Owned by the caller. | 189 // The parsed response headers. Owned by the caller. |
189 HttpResponseInfo* response_; | 190 HttpResponseInfo* response_; |
190 | 191 |
191 // Indicates the content length. If this value is less than zero | 192 // Indicates the content length. If this value is less than zero |
192 // (and chunked_decoder_ is null), then we must read until the server | 193 // (and chunked_decoder_ is null), then we must read until the server |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 bool sent_last_chunk_; | 230 bool sent_last_chunk_; |
230 | 231 |
231 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; | 232 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; |
232 | 233 |
233 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 234 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
234 }; | 235 }; |
235 | 236 |
236 } // namespace net | 237 } // namespace net |
237 | 238 |
238 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 239 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
OLD | NEW |