| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 // These functions implement the interface described in HttpStream with | 48 // These functions implement the interface described in HttpStream with |
| 49 // some additional functionality | 49 // some additional functionality |
| 50 int SendRequest(const std::string& request_line, | 50 int SendRequest(const std::string& request_line, |
| 51 const HttpRequestHeaders& headers, | 51 const HttpRequestHeaders& headers, |
| 52 HttpResponseInfo* response, | 52 HttpResponseInfo* response, |
| 53 const CompletionCallback& callback); | 53 const CompletionCallback& callback); |
| 54 | 54 |
| 55 int ReadResponseHeaders(const CompletionCallback& callback); | 55 int ReadResponseHeaders(const CompletionCallback& callback); |
| 56 | 56 |
| 57 int ReadResponseBody(IOBuffer* buf, int buf_len, | 57 int ReadResponseBody(IOBuffer* buf, |
| 58 int buf_len, |
| 58 const CompletionCallback& callback); | 59 const CompletionCallback& callback); |
| 59 | 60 |
| 60 void Close(bool not_reusable); | 61 void Close(bool not_reusable); |
| 61 | 62 |
| 62 // Returns the progress of uploading. When data is chunked, size is set to | 63 // Returns the progress of uploading. When data is chunked, size is set to |
| 63 // zero, but position will not be. | 64 // zero, but position will not be. |
| 64 UploadProgress GetUploadProgress() const; | 65 UploadProgress GetUploadProgress() const; |
| 65 | 66 |
| 66 HttpResponseInfo* GetResponseInfo(); | 67 HttpResponseInfo* GetResponseInfo(); |
| 67 | 68 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 int upload_error_; | 248 int upload_error_; |
| 248 | 249 |
| 249 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; | 250 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; |
| 250 | 251 |
| 251 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 252 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
| 252 }; | 253 }; |
| 253 | 254 |
| 254 } // namespace net | 255 } // namespace net |
| 255 | 256 |
| 256 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 257 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
| OLD | NEW |