diff options
Diffstat (limited to 'net/base/io_buffer.h')
-rw-r--r-- | net/base/io_buffer.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/base/io_buffer.h b/net/base/io_buffer.h index b390103..39399ad 100644 --- a/net/base/io_buffer.h +++ b/net/base/io_buffer.h @@ -5,6 +5,7 @@ #ifndef NET_BASE_IO_BUFFER_H_ #define NET_BASE_IO_BUFFER_H_ +#include "base/logging.h" #include "base/ref_counted.h" namespace net { @@ -13,7 +14,9 @@ namespace net { // easier asynchronous IO handling. class IOBuffer : public base::RefCountedThreadSafe<IOBuffer> { public: + IOBuffer() : data_(NULL) {} explicit IOBuffer(int buffer_size) { + DCHECK(buffer_size); data_ = new char[buffer_size]; } explicit IOBuffer(char* buffer) : data_(buffer) {} |