summaryrefslogtreecommitdiffstats
path: root/net/flip/flip_io_buffer.h
diff options
context:
space:
mode:
authorlaforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 01:07:02 +0000
committerlaforge@chromium.org <laforge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-25 01:07:02 +0000
commit9635b9f038bae457735d7e169125919a3f24f806 (patch)
treeef721c1e9c612a8bcfd5369afb0ef8008d50cb5c /net/flip/flip_io_buffer.h
parent38b48040588028d3e949b077e5f756ff4985e287 (diff)
downloadchromium_src-9635b9f038bae457735d7e169125919a3f24f806.zip
chromium_src-9635b9f038bae457735d7e169125919a3f24f806.tar.gz
chromium_src-9635b9f038bae457735d7e169125919a3f24f806.tar.bz2
Revert 33018 - Fix the FlipSession to support partial writes.
Modified the FlipIOBuffer to use a DrainableIOBuffer instead of a IOBufferWithSize. When a write completes, we drain the bytes, and only fetch the next FlipFrame from the queue after we have fully drained the buffer. I will update the tests to be much more thorough in my next CL. BUG=none TEST=FlipNetworkTransactionTest.PartialWrites Review URL: http://codereview.chromium.org/436019 TBR=mbelshe@google.com Review URL: http://codereview.chromium.org/440011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33020 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/flip/flip_io_buffer.h')
-rw-r--r--net/flip/flip_io_buffer.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/flip/flip_io_buffer.h b/net/flip/flip_io_buffer.h
index c16c39c..ffb4b3b 100644
--- a/net/flip/flip_io_buffer.h
+++ b/net/flip/flip_io_buffer.h
@@ -20,16 +20,15 @@ class FlipIOBuffer {
public:
// Constructor
// |buffer| is the actual data buffer.
- // |size| is the size of the data buffer.
// |priority| is the priority of this buffer. Lower numbers are higher
// priority.
// |stream| is a pointer to the stream which is managing this buffer.
- FlipIOBuffer(IOBuffer* buffer, int size, int priority, FlipStream* stream);
+ FlipIOBuffer(IOBufferWithSize* buffer, int priority, FlipStream* stream);
FlipIOBuffer();
~FlipIOBuffer();
// Accessors.
- DrainableIOBuffer* buffer() const { return buffer_; }
+ IOBuffer* buffer() const { return buffer_; }
size_t size() const { return buffer_->size(); }
void release();
int priority() const { return priority_; }
@@ -43,7 +42,7 @@ class FlipIOBuffer {
}
private:
- scoped_refptr<DrainableIOBuffer> buffer_;
+ scoped_refptr<IOBufferWithSize> buffer_;
int priority_;
uint64 position_;
scoped_refptr<FlipStream> stream_;