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" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/string_piece.h" | 12 #include "base/string_piece.h" |
13 #include "net/base/completion_callback.h" | 13 #include "net/base/completion_callback.h" |
14 #include "net/base/net_export.h" | 14 #include "net/base/net_export.h" |
15 #include "net/base/net_log.h" | 15 #include "net/base/net_log.h" |
16 #include "net/base/upload_data_stream.h" | 16 #include "net/base/upload_data_stream.h" |
| 17 #include "net/base/upload_progress.h" |
17 #include "net/http/http_chunked_decoder.h" | 18 #include "net/http/http_chunked_decoder.h" |
18 | 19 |
19 namespace net { | 20 namespace net { |
20 | 21 |
21 class ClientSocketHandle; | 22 class ClientSocketHandle; |
22 class DrainableIOBuffer; | 23 class DrainableIOBuffer; |
23 class GrowableIOBuffer; | 24 class GrowableIOBuffer; |
24 struct HttpRequestInfo; | 25 struct HttpRequestInfo; |
25 class HttpRequestHeaders; | 26 class HttpRequestHeaders; |
26 class HttpResponseInfo; | 27 class HttpResponseInfo; |
(...skipping 23 matching lines...) Expand all Loading... |
50 HttpResponseInfo* response, | 51 HttpResponseInfo* response, |
51 const CompletionCallback& callback); | 52 const CompletionCallback& callback); |
52 | 53 |
53 int ReadResponseHeaders(const CompletionCallback& callback); | 54 int ReadResponseHeaders(const CompletionCallback& callback); |
54 | 55 |
55 int ReadResponseBody(IOBuffer* buf, int buf_len, | 56 int ReadResponseBody(IOBuffer* buf, int buf_len, |
56 const CompletionCallback& callback); | 57 const CompletionCallback& callback); |
57 | 58 |
58 void Close(bool not_reusable); | 59 void Close(bool not_reusable); |
59 | 60 |
60 uint64 GetUploadProgress() const; | 61 UploadProgress GetUploadProgress() const; |
61 | 62 |
62 HttpResponseInfo* GetResponseInfo(); | 63 HttpResponseInfo* GetResponseInfo(); |
63 | 64 |
64 bool IsResponseBodyComplete() const; | 65 bool IsResponseBodyComplete() const; |
65 | 66 |
66 bool CanFindEndOfResponse() const; | 67 bool CanFindEndOfResponse() const; |
67 | 68 |
68 bool IsMoreDataBuffered() const; | 69 bool IsMoreDataBuffered() const; |
69 | 70 |
70 bool IsConnectionReused() const; | 71 bool IsConnectionReused() const; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 scoped_refptr<SeekableIOBuffer> request_body_buf_; | 233 scoped_refptr<SeekableIOBuffer> request_body_buf_; |
233 size_t chunk_length_without_encoding_; | 234 size_t chunk_length_without_encoding_; |
234 bool sent_last_chunk_; | 235 bool sent_last_chunk_; |
235 | 236 |
236 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 237 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
237 }; | 238 }; |
238 | 239 |
239 } // namespace net | 240 } // namespace net |
240 | 241 |
241 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 242 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
OLD | NEW |