OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BASE_UPLOAD_DATA_STREAM_H_ | 5 #ifndef NET_BASE_UPLOAD_DATA_STREAM_H_ |
6 #define NET_BASE_UPLOAD_DATA_STREAM_H_ | 6 #define NET_BASE_UPLOAD_DATA_STREAM_H_ |
7 | 7 |
8 #include "net/base/file_stream.h" | 8 #include "net/base/file_stream.h" |
9 #include "net/base/io_buffer.h" | |
10 #include "net/base/upload_data.h" | 9 #include "net/base/upload_data.h" |
11 | 10 |
12 namespace net { | 11 namespace net { |
13 | 12 |
| 13 class IOBuffer; |
| 14 |
14 class UploadDataStream { | 15 class UploadDataStream { |
15 public: | 16 public: |
16 explicit UploadDataStream(const UploadData* data); | 17 explicit UploadDataStream(const UploadData* data); |
17 ~UploadDataStream(); | 18 ~UploadDataStream(); |
18 | 19 |
19 // Returns the stream's buffer and buffer length. | 20 // Returns the stream's buffer and buffer length. |
20 IOBuffer* buf() const { return buf_; } | 21 IOBuffer* buf() const { return buf_; } |
21 size_t buf_len() const { return buf_len_; } | 22 size_t buf_len() const { return buf_len_; } |
22 | 23 |
23 // Call to indicate that a portion of the stream's buffer was consumed. This | 24 // Call to indicate that a portion of the stream's buffer was consumed. This |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Size and current read position within the stream. | 61 // Size and current read position within the stream. |
61 uint64 total_size_; | 62 uint64 total_size_; |
62 uint64 current_position_; | 63 uint64 current_position_; |
63 | 64 |
64 DISALLOW_EVIL_CONSTRUCTORS(UploadDataStream); | 65 DISALLOW_EVIL_CONSTRUCTORS(UploadDataStream); |
65 }; | 66 }; |
66 | 67 |
67 } // namespace net | 68 } // namespace net |
68 | 69 |
69 #endif // NET_BASE_UPLOAD_DATA_STREAM_H_ | 70 #endif // NET_BASE_UPLOAD_DATA_STREAM_H_ |
OLD | NEW |