| 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 19 matching lines...) Expand all Loading... |
| 30 public: | 30 public: |
| 31 // Any data in |read_buffer| will be used before reading from the socket | 31 // Any data in |read_buffer| will be used before reading from the socket |
| 32 // and any data left over after parsing the stream will be put into | 32 // and any data left over after parsing the stream will be put into |
| 33 // |read_buffer|. The left over data will start at offset 0 and the | 33 // |read_buffer|. The left over data will start at offset 0 and the |
| 34 // buffer's offset will be set to the first free byte. |read_buffer| may | 34 // buffer's offset will be set to the first free byte. |read_buffer| may |
| 35 // have its capacity changed. | 35 // have its capacity changed. |
| 36 HttpStreamParser(ClientSocketHandle* connection, | 36 HttpStreamParser(ClientSocketHandle* connection, |
| 37 const HttpRequestInfo* request, | 37 const HttpRequestInfo* request, |
| 38 GrowableIOBuffer* read_buffer, | 38 GrowableIOBuffer* read_buffer, |
| 39 const BoundNetLog& net_log); | 39 const BoundNetLog& net_log); |
| 40 ~HttpStreamParser(); | 40 virtual ~HttpStreamParser(); |
| 41 | 41 |
| 42 // These functions implement the interface described in HttpStream with | 42 // These functions implement the interface described in HttpStream with |
| 43 // some additional functionality | 43 // some additional functionality |
| 44 int SendRequest(const std::string& request_line, | 44 int SendRequest(const std::string& request_line, |
| 45 const HttpRequestHeaders& headers, | 45 const HttpRequestHeaders& headers, |
| 46 UploadDataStream* request_body, | 46 UploadDataStream* request_body, |
| 47 HttpResponseInfo* response, CompletionCallback* callback); | 47 HttpResponseInfo* response, CompletionCallback* callback); |
| 48 | 48 |
| 49 int ReadResponseHeaders(CompletionCallback* callback); | 49 int ReadResponseHeaders(CompletionCallback* callback); |
| 50 | 50 |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |