Chromium Code Reviews| Index: net/base/io_buffer.h |
| =================================================================== |
| --- net/base/io_buffer.h (revision 30229) |
| +++ net/base/io_buffer.h (working copy) |
| @@ -106,12 +106,15 @@ |
| GrowableIOBuffer() : IOBuffer(), capacity_(0), offset_(0) {} |
| ~GrowableIOBuffer() { data_ = NULL; } |
| + |
| + // realloc memory to the specified capacity. On failure, the capacity |
|
wtc
2009/10/27 22:42:10
You need to document that true means success and f
|
| + // and buffer are unchanged. |
| + bool SetCapacity(int capacity); |
| int capacity() { return capacity_; } |
| - void set_capacity(int capacity); |
| // |offset| moves the |data_| pointer, allowing "seeking" in the data. |
| + void set_offset(int offset); |
| int offset() { return offset_; } |
| - void set_offset(int offset); |
| int RemainingCapacity() { return capacity_ - offset_; } |
| char* StartOfBuffer() { return real_data_.get(); } |