Index: net/base/upload_data_stream.h |
diff --git a/net/base/upload_data_stream.h b/net/base/upload_data_stream.h |
index 8583fb46b850bc69e0705dbb403781a0af2e20a4..50584f950e7fd663beaf162119ec8c299938e6c9 100644 |
--- a/net/base/upload_data_stream.h |
+++ b/net/base/upload_data_stream.h |
@@ -30,7 +30,10 @@ class UploadDataStream { |
// Call to indicate that a portion of the stream's buffer was consumed. This |
// call modifies the stream's buffer so that it contains the next segment of |
// the upload data to be consumed. |
- void DidConsume(size_t num_bytes); |
+ void ConsumeAndFillBuffer(size_t num_bytes); |
wtc
2011/01/21 19:35:54
How about "MarkConsumedAndFillBuffer"?
|
+ |
+ // Sets the callback to be invoked when new chunks are available to upload. |
+ void set_chunk_callback(ChunkCallback* callback); |
wtc
2011/01/21 19:35:54
Nit: inline this method, as you inlined is_chunked
|
// Returns the total size of the data stream and the current position. |
// size() is not to be used to determine whether the stream has ended |
@@ -39,6 +42,8 @@ class UploadDataStream { |
uint64 size() const { return total_size_; } |
uint64 position() const { return current_position_; } |
+ bool is_chunked() const { return data_->is_chunked(); } |
+ |
// Returns whether there is no more data to read, regardless of whether |
// position < size. |
bool eof() const { return eof_; } |
@@ -64,8 +69,8 @@ class UploadDataStream { |
scoped_refptr<IOBuffer> buf_; |
size_t buf_len_; |
- // Iterator to the upload element to be written to the send buffer next. |
- std::vector<UploadData::Element>::iterator next_element_; |
+ // Index of the upload element to be written to the send buffer next. |
+ size_t next_element_; |
// The byte offset into next_element_'s data buffer if the next element is |
// a TYPE_BYTES element. |