| 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 // HttpBasicStream is a simple implementation of HttpStream. It assumes it is | 5 // HttpBasicStream is a simple implementation of HttpStream. It assumes it is |
| 6 // not sharing a sharing with any other HttpStreams, therefore it just reads and | 6 // not sharing a sharing with any other HttpStreams, therefore it just reads and |
| 7 // writes directly to the Http Stream. | 7 // writes directly to the Http Stream. |
| 8 | 8 |
| 9 #ifndef NET_HTTP_HTTP_BASIC_STREAM_H_ | 9 #ifndef NET_HTTP_HTTP_BASIC_STREAM_H_ |
| 10 #define NET_HTTP_HTTP_BASIC_STREAM_H_ | 10 #define NET_HTTP_HTTP_BASIC_STREAM_H_ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // |parser| is non-null, then InitializeStream should not be called, | 35 // |parser| is non-null, then InitializeStream should not be called, |
| 36 // as the stream is already initialized. | 36 // as the stream is already initialized. |
| 37 HttpBasicStream(ClientSocketHandle* connection, | 37 HttpBasicStream(ClientSocketHandle* connection, |
| 38 HttpStreamParser* parser, | 38 HttpStreamParser* parser, |
| 39 bool using_proxy); | 39 bool using_proxy); |
| 40 virtual ~HttpBasicStream(); | 40 virtual ~HttpBasicStream(); |
| 41 | 41 |
| 42 // HttpStream methods: | 42 // HttpStream methods: |
| 43 virtual int InitializeStream(const HttpRequestInfo* request_info, | 43 virtual int InitializeStream(const HttpRequestInfo* request_info, |
| 44 const BoundNetLog& net_log, | 44 const BoundNetLog& net_log, |
| 45 OldCompletionCallback* callback) OVERRIDE; | 45 const CompletionCallback& callback) OVERRIDE; |
| 46 | 46 |
| 47 virtual int SendRequest(const HttpRequestHeaders& headers, | 47 virtual int SendRequest(const HttpRequestHeaders& headers, |
| 48 UploadDataStream* request_body, | 48 UploadDataStream* request_body, |
| 49 HttpResponseInfo* response, | 49 HttpResponseInfo* response, |
| 50 OldCompletionCallback* callback) OVERRIDE; | 50 const CompletionCallback& callback) OVERRIDE; |
| 51 | 51 |
| 52 virtual uint64 GetUploadProgress() const OVERRIDE; | 52 virtual uint64 GetUploadProgress() const OVERRIDE; |
| 53 | 53 |
| 54 virtual int ReadResponseHeaders(OldCompletionCallback* callback) OVERRIDE; | 54 virtual int ReadResponseHeaders(const CompletionCallback& callback) OVERRIDE; |
| 55 | 55 |
| 56 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; | 56 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
| 57 | 57 |
| 58 virtual int ReadResponseBody(IOBuffer* buf, int buf_len, | 58 virtual int ReadResponseBody(IOBuffer* buf, int buf_len, |
| 59 OldCompletionCallback* callback) OVERRIDE; | 59 const CompletionCallback& callback) OVERRIDE; |
| 60 | 60 |
| 61 virtual void Close(bool not_reusable) OVERRIDE; | 61 virtual void Close(bool not_reusable) OVERRIDE; |
| 62 | 62 |
| 63 virtual HttpStream* RenewStreamForAuth() OVERRIDE; | 63 virtual HttpStream* RenewStreamForAuth() OVERRIDE; |
| 64 | 64 |
| 65 virtual bool IsResponseBodyComplete() const OVERRIDE; | 65 virtual bool IsResponseBodyComplete() const OVERRIDE; |
| 66 | 66 |
| 67 virtual bool CanFindEndOfResponse() const OVERRIDE; | 67 virtual bool CanFindEndOfResponse() const OVERRIDE; |
| 68 | 68 |
| 69 virtual bool IsMoreDataBuffered() const OVERRIDE; | 69 virtual bool IsMoreDataBuffered() const OVERRIDE; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 const HttpResponseInfo* response_; | 101 const HttpResponseInfo* response_; |
| 102 | 102 |
| 103 int64 bytes_read_offset_; | 103 int64 bytes_read_offset_; |
| 104 | 104 |
| 105 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); | 105 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); |
| 106 }; | 106 }; |
| 107 | 107 |
| 108 } // namespace net | 108 } // namespace net |
| 109 | 109 |
| 110 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ | 110 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ |
| OLD | NEW |