summaryrefslogtreecommitdiffstats
path: root/net/flip/flip_io_buffer.cc
diff options
context:
space:
mode:
authormbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-29 16:39:48 +0000
committermbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-29 16:39:48 +0000
commitbf2491a9366d2b72c0ebd3747e71c10f2504deaa (patch)
treed6e9c3a8e9b0f28a5a080a22da31fa0f819dcd6e /net/flip/flip_io_buffer.cc
parentacf0a90181626aa23b7649c07e5be02b848d3e69 (diff)
downloadchromium_src-bf2491a9366d2b72c0ebd3747e71c10f2504deaa.zip
chromium_src-bf2491a9366d2b72c0ebd3747e71c10f2504deaa.tar.gz
chromium_src-bf2491a9366d2b72c0ebd3747e71c10f2504deaa.tar.bz2
Reland: 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/451002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33250 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/flip/flip_io_buffer.cc')
-rw-r--r--net/flip/flip_io_buffer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/flip/flip_io_buffer.cc b/net/flip/flip_io_buffer.cc
index 5235c62..87d8d21 100644
--- a/net/flip/flip_io_buffer.cc
+++ b/net/flip/flip_io_buffer.cc
@@ -11,8 +11,8 @@ namespace net {
uint64 FlipIOBuffer::order_ = 0;
FlipIOBuffer::FlipIOBuffer(
- IOBufferWithSize* buffer, int priority, FlipStream* stream)
- : buffer_(buffer),
+ IOBuffer* buffer, int size, int priority, FlipStream* stream)
+ : buffer_(new DrainableIOBuffer(buffer, size)),
priority_(priority),
position_(++order_),
stream_(stream) {}