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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 HttpResponseInfo* response, | 51 HttpResponseInfo* response, |
52 const CompletionCallback& callback); | 52 const CompletionCallback& callback); |
53 | 53 |
54 int ReadResponseHeaders(const CompletionCallback& callback); | 54 int ReadResponseHeaders(const CompletionCallback& callback); |
55 | 55 |
56 int ReadResponseBody(IOBuffer* buf, int buf_len, | 56 int ReadResponseBody(IOBuffer* buf, int buf_len, |
57 const CompletionCallback& callback); | 57 const CompletionCallback& callback); |
58 | 58 |
59 void Close(bool not_reusable); | 59 void Close(bool not_reusable); |
60 | 60 |
| 61 // Returns the progress of uploading. When data is chunked, size is set to |
| 62 // zero, but position will not be. |
61 UploadProgress GetUploadProgress() const; | 63 UploadProgress GetUploadProgress() const; |
62 | 64 |
63 HttpResponseInfo* GetResponseInfo(); | 65 HttpResponseInfo* GetResponseInfo(); |
64 | 66 |
65 bool IsResponseBodyComplete() const; | 67 bool IsResponseBodyComplete() const; |
66 | 68 |
67 bool CanFindEndOfResponse() const; | 69 bool CanFindEndOfResponse() const; |
68 | 70 |
69 bool IsMoreDataBuffered() const; | 71 bool IsMoreDataBuffered() const; |
70 | 72 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 scoped_refptr<SeekableIOBuffer> request_body_buf_; | 235 scoped_refptr<SeekableIOBuffer> request_body_buf_; |
234 size_t chunk_length_without_encoding_; | 236 size_t chunk_length_without_encoding_; |
235 bool sent_last_chunk_; | 237 bool sent_last_chunk_; |
236 | 238 |
237 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 239 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
238 }; | 240 }; |
239 | 241 |
240 } // namespace net | 242 } // namespace net |
241 | 243 |
242 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 244 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
OLD | NEW |