summaryrefslogtreecommitdiffstats
path: root/net/base/upload_data_stream.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/base/upload_data_stream.h')
-rw-r--r--net/base/upload_data_stream.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/base/upload_data_stream.h b/net/base/upload_data_stream.h
index 0d179d2..8583fb4 100644
--- a/net/base/upload_data_stream.h
+++ b/net/base/upload_data_stream.h
@@ -16,13 +16,13 @@ class IOBuffer;
class UploadDataStream {
public:
+ ~UploadDataStream();
+
// Returns a new instance of UploadDataStream if it can be created and
// initialized successfully. If not, NULL will be returned and the error
// code will be set if the output parameter error_code is not empty.
static UploadDataStream* Create(UploadData* data, int* error_code);
- ~UploadDataStream();
-
// Returns the stream's buffer and buffer length.
IOBuffer* buf() const { return buf_; }
size_t buf_len() const { return buf_len_; }
@@ -44,6 +44,8 @@ class UploadDataStream {
bool eof() const { return eof_; }
private:
+ enum { kBufSize = 16384 };
+
// Protects from public access since now we have a static creator function
// which will do both creation and initialization and might return an error.
explicit UploadDataStream(UploadData* data);
@@ -59,7 +61,6 @@ class UploadDataStream {
// always at the front of the buffer. If we cannot send all of the buffer at
// once, then we memmove the remaining portion and back-fill the buffer for
// the next "write" call. buf_len_ indicates how much data is in the buffer.
- enum { kBufSize = 16384 };
scoped_refptr<IOBuffer> buf_;
size_t buf_len_;