| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // Parse the headers into response_. Returns OK on success or a net::Error on | 184 // Parse the headers into response_. Returns OK on success or a net::Error on |
| 185 // failure. | 185 // failure. |
| 186 int ParseResponseHeaders(int end_of_header_offset); | 186 int ParseResponseHeaders(int end_of_header_offset); |
| 187 | 187 |
| 188 // Examine the parsed headers to try to determine the response body size. | 188 // Examine the parsed headers to try to determine the response body size. |
| 189 void CalculateResponseBodySize(); | 189 void CalculateResponseBodySize(); |
| 190 | 190 |
| 191 // Uploads statistics about status line compliance with RFC 7230. | 191 // Uploads statistics about status line compliance with RFC 7230. |
| 192 void ValidateStatusLine(const std::string& status_line); | 192 void ValidateStatusLine(const std::string& status_line); |
| 193 | 193 |
| 194 // Flush buffers once the request is sent. |
| 195 void FlushBuffers(); |
| 196 |
| 194 // Next state of the request, when the current one completes. | 197 // Next state of the request, when the current one completes. |
| 195 State io_state_; | 198 State io_state_; |
| 196 | 199 |
| 197 // The request to send. | 200 // The request to send. |
| 198 const HttpRequestInfo* request_; | 201 const HttpRequestInfo* request_; |
| 199 | 202 |
| 200 // The request header data. May include a merged request body. | 203 // The request header data. May include a merged request body. |
| 201 scoped_refptr<DrainableIOBuffer> request_headers_; | 204 scoped_refptr<DrainableIOBuffer> request_headers_; |
| 202 | 205 |
| 203 // Size of just the request headers. May be less than the length of | 206 // Size of just the request headers. May be less than the length of |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 int upload_error_; | 279 int upload_error_; |
| 277 | 280 |
| 278 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; | 281 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; |
| 279 | 282 |
| 280 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 283 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
| 281 }; | 284 }; |
| 282 | 285 |
| 283 } // namespace net | 286 } // namespace net |
| 284 | 287 |
| 285 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 288 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
| OLD | NEW |