| 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 |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/memory/ref_counted.h" | 15 #include "base/memory/ref_counted.h" |
| 16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
| 17 #include "base/strings/string_piece.h" | 17 #include "base/strings/string_piece.h" |
| 18 #include "crypto/ec_private_key.h" | 18 #include "crypto/ec_private_key.h" |
| 19 #include "net/base/completion_callback.h" | 19 #include "net/base/completion_callback.h" |
| 20 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
| 21 #include "net/base/net_export.h" | 21 #include "net/base/net_export.h" |
| 22 #include "net/base/upload_progress.h" | |
| 23 #include "net/log/net_log.h" | 22 #include "net/log/net_log.h" |
| 24 | 23 |
| 25 namespace net { | 24 namespace net { |
| 26 | 25 |
| 27 class ClientSocketHandle; | 26 class ClientSocketHandle; |
| 28 class DrainableIOBuffer; | 27 class DrainableIOBuffer; |
| 29 class GrowableIOBuffer; | 28 class GrowableIOBuffer; |
| 30 class HttpChunkedDecoder; | 29 class HttpChunkedDecoder; |
| 31 struct HttpRequestInfo; | 30 struct HttpRequestInfo; |
| 32 class HttpRequestHeaders; | 31 class HttpRequestHeaders; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 HttpResponseInfo* response, | 64 HttpResponseInfo* response, |
| 66 const CompletionCallback& callback); | 65 const CompletionCallback& callback); |
| 67 | 66 |
| 68 int ReadResponseHeaders(const CompletionCallback& callback); | 67 int ReadResponseHeaders(const CompletionCallback& callback); |
| 69 | 68 |
| 70 int ReadResponseBody(IOBuffer* buf, int buf_len, | 69 int ReadResponseBody(IOBuffer* buf, int buf_len, |
| 71 const CompletionCallback& callback); | 70 const CompletionCallback& callback); |
| 72 | 71 |
| 73 void Close(bool not_reusable); | 72 void Close(bool not_reusable); |
| 74 | 73 |
| 75 // Returns the progress of uploading. When data is chunked, size is set to | |
| 76 // zero, but position will not be. | |
| 77 UploadProgress GetUploadProgress() const; | |
| 78 | |
| 79 bool IsResponseBodyComplete() const; | 74 bool IsResponseBodyComplete() const; |
| 80 | 75 |
| 81 bool CanFindEndOfResponse() const; | 76 bool CanFindEndOfResponse() const; |
| 82 | 77 |
| 83 bool IsMoreDataBuffered() const; | 78 bool IsMoreDataBuffered() const; |
| 84 | 79 |
| 85 bool IsConnectionReused() const; | 80 bool IsConnectionReused() const; |
| 86 | 81 |
| 87 void SetConnectionReused(); | 82 void SetConnectionReused(); |
| 88 | 83 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 int upload_error_; | 287 int upload_error_; |
| 293 | 288 |
| 294 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; | 289 base::WeakPtrFactory<HttpStreamParser> weak_ptr_factory_; |
| 295 | 290 |
| 296 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); | 291 DISALLOW_COPY_AND_ASSIGN(HttpStreamParser); |
| 297 }; | 292 }; |
| 298 | 293 |
| 299 } // namespace net | 294 } // namespace net |
| 300 | 295 |
| 301 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ | 296 #endif // NET_HTTP_HTTP_STREAM_PARSER_H_ |
| OLD | NEW |