Index: net/base/upload_data_stream.h |
diff --git a/net/base/upload_data_stream.h b/net/base/upload_data_stream.h |
index f291140348b7d2acea7b940eee783771fa36e018..f5190103ec092c584343edcd3888db194adfa726 100644 |
--- a/net/base/upload_data_stream.h |
+++ b/net/base/upload_data_stream.h |
@@ -27,6 +27,12 @@ class UploadDataStream { |
IOBuffer* buf() const { return buf_; } |
size_t buf_len() const { return buf_len_; } |
+ // TODO(satish): We should ideally have UploadDataStream expose a Read() |
+ // method which returns data in a caller provided IOBuffer. That would do away |
+ // with this method and make the interface cleaner as well with less memmove |
+ // calls. |
+ size_t GetMaxBufferSize() const { return kBufSize; } |
+ |
// 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. |
@@ -50,6 +56,12 @@ class UploadDataStream { |
// position < size. |
bool eof() const { return eof_; } |
+ // Returns whether the data available in buf() includes the last chunk in a |
+ // chunked data stream. This method returns true once the final chunk has been |
+ // placed in the IOBuffer returned by buf(), in contrast to eof() which |
+ // returns true only after the data in buf() has been consumed. |
+ bool peek_end_of_chunks() const; |
+ |
private: |
enum { kBufSize = 16384 }; |