diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 16:33:59 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 16:33:59 +0000 |
commit | 230caddcd18e4c0d9eb7ffed1178607473d3269e (patch) | |
tree | 42bfe9edb1bc6cd2ddd67f0dbb2c3ab52e6ba9a4 /net | |
parent | 833b88a7a71cff01f35cce5a86b38ff963ae16f2 (diff) | |
download | chromium_src-230caddcd18e4c0d9eb7ffed1178607473d3269e.zip chromium_src-230caddcd18e4c0d9eb7ffed1178607473d3269e.tar.gz chromium_src-230caddcd18e4c0d9eb7ffed1178607473d3269e.tar.bz2 |
Fixup the flip buffer to use a regular IOBuffer
rather than the MovableIOBuffer because we weren't
using it anyway. Mainly this just simplifies a little
code.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/208042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26818 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/flip/flip_session.cc | 9 | ||||
-rw-r--r-- | net/flip/flip_session.h | 3 |
2 files changed, 4 insertions, 8 deletions
diff --git a/net/flip/flip_session.cc b/net/flip/flip_session.cc index 3d63ef9..16cd491 100644 --- a/net/flip/flip_session.cc +++ b/net/flip/flip_session.cc @@ -96,8 +96,7 @@ FlipSession::FlipSession(std::string host, HttpNetworkSession* session) connection_started_(false), delayed_write_pending_(false), write_pending_(false), - read_buffer_(new net::MovableIOBuffer(kReadBufferSize)), - read_buffer_bytes_read_(0), + read_buffer_(new IOBuffer(kReadBufferSize)), read_pending_(false), stream_hi_water_mark_(0) { // Always start at 1 for the first stream id. @@ -365,10 +364,8 @@ void FlipSession::ReadSocket() { if (read_pending_) return; - size_t max_bytes = kReadBufferSize; - read_buffer_->set_data(read_buffer_bytes_read_); - max_bytes -= read_buffer_bytes_read_; - int bytes_read = connection_.socket()->Read(read_buffer_.get(), max_bytes, + int bytes_read = connection_.socket()->Read(read_buffer_.get(), + kReadBufferSize, &read_callback_); switch (bytes_read) { case 0: diff --git a/net/flip/flip_session.h b/net/flip/flip_session.h index b608ddb..61a5d07 100644 --- a/net/flip/flip_session.h +++ b/net/flip/flip_session.h @@ -180,8 +180,7 @@ class FlipSession : public base::RefCounted<FlipSession>, // The read buffer used to read data from the socket. enum { kReadBufferSize = (4 * 1024) }; - scoped_refptr<net::MovableIOBuffer> read_buffer_; - int read_buffer_bytes_read_; // bytes left in the buffer from prior read. + scoped_refptr<IOBuffer> read_buffer_; bool read_pending_; int stream_hi_water_mark_; // The next stream id to use. |