Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: net/base/io_buffer.h

Issue 178473022: MTP Streaming: Readahead Buffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: this patchset allows memory reuse Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/io_buffer.h
diff --git a/net/base/io_buffer.h b/net/base/io_buffer.h
index 0ce52e8d79c02473adabd6af98e2e9272d9b2fdb..5857e4165fa4d60b4510b69ecb8b0d86eda6efc8 100644
--- a/net/base/io_buffer.h
+++ b/net/base/io_buffer.h
@@ -158,6 +158,10 @@ class NET_EXPORT DrainableIOBuffer : public IOBuffer {
// and remaining are updated appropriately.
void SetOffset(int bytes);
+ // Changes the size of the buffer. Caller is responsible for ensuring that
+ // the new size does not exceed the size of the base buffer.
+ void SetSize(int size);
vandebo (ex-Chrome) 2014/03/04 21:55:12 I don't think we want to add this. If that means
tommycli 2014/03/04 23:03:44 Done.
+
int size() const { return size_; }
private:

Powered by Google App Engine
This is Rietveld 408576698