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 // 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 29 matching lines...) Expand all Loading... |
40 // HttpStream methods: | 40 // HttpStream methods: |
41 virtual int InitializeStream(const HttpRequestInfo* request_info, | 41 virtual int InitializeStream(const HttpRequestInfo* request_info, |
42 const BoundNetLog& net_log, | 42 const BoundNetLog& net_log, |
43 const CompletionCallback& callback) OVERRIDE; | 43 const CompletionCallback& callback) OVERRIDE; |
44 | 44 |
45 virtual int SendRequest(const HttpRequestHeaders& headers, | 45 virtual int SendRequest(const HttpRequestHeaders& headers, |
46 scoped_ptr<UploadDataStream> request_body, | 46 scoped_ptr<UploadDataStream> request_body, |
47 HttpResponseInfo* response, | 47 HttpResponseInfo* response, |
48 const CompletionCallback& callback) OVERRIDE; | 48 const CompletionCallback& callback) OVERRIDE; |
49 | 49 |
50 virtual uint64 GetUploadProgress() const OVERRIDE; | 50 virtual UploadProgress GetUploadProgress() const OVERRIDE; |
51 | 51 |
52 virtual int ReadResponseHeaders(const CompletionCallback& callback) OVERRIDE; | 52 virtual int ReadResponseHeaders(const CompletionCallback& callback) OVERRIDE; |
53 | 53 |
54 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; | 54 virtual const HttpResponseInfo* GetResponseInfo() const OVERRIDE; |
55 | 55 |
56 virtual int ReadResponseBody(IOBuffer* buf, int buf_len, | 56 virtual int ReadResponseBody(IOBuffer* buf, int buf_len, |
57 const CompletionCallback& callback) OVERRIDE; | 57 const CompletionCallback& callback) OVERRIDE; |
58 | 58 |
59 virtual void Close(bool not_reusable) OVERRIDE; | 59 virtual void Close(bool not_reusable) OVERRIDE; |
60 | 60 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 const HttpResponseInfo* response_; | 99 const HttpResponseInfo* response_; |
100 | 100 |
101 int64 bytes_read_offset_; | 101 int64 bytes_read_offset_; |
102 | 102 |
103 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); | 103 DISALLOW_COPY_AND_ASSIGN(HttpBasicStream); |
104 }; | 104 }; |
105 | 105 |
106 } // namespace net | 106 } // namespace net |
107 | 107 |
108 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ | 108 #endif // NET_HTTP_HTTP_BASIC_STREAM_H_ |
OLD | NEW |