diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 17:35:37 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 17:35:37 +0000 |
commit | c19c715aaa359f0d99fa788051989ce2e1d4f89a (patch) | |
tree | 30d7fca8bac962eb0c4b7405a19deb7fd8293bf2 /net/disk_cache/sparse_control.cc | |
parent | 434171fd3e3d28404c66416a4c98d492ea975b3f (diff) | |
download | chromium_src-c19c715aaa359f0d99fa788051989ce2e1d4f89a.zip chromium_src-c19c715aaa359f0d99fa788051989ce2e1d4f89a.tar.gz chromium_src-c19c715aaa359f0d99fa788051989ce2e1d4f89a.tar.bz2 |
A couple new io buffers that encapsulate more data and are therefore easier to use and easier to reason about. Inspired by RequestHeaders and ResponseHeaders in http_network_transaction.h Separated out of the refactoring of HttpNetworkTransaction to support pipelining. (http://codereview.chromium.org/249031)
BUG=13289
TEST=none
Review URL: http://codereview.chromium.org/264025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28978 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache/sparse_control.cc')
-rw-r--r-- | net/disk_cache/sparse_control.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/disk_cache/sparse_control.cc b/net/disk_cache/sparse_control.cc index 3c1dd8c..fb304be 100644 --- a/net/disk_cache/sparse_control.cc +++ b/net/disk_cache/sparse_control.cc @@ -185,7 +185,7 @@ int SparseControl::StartIO(SparseOperation op, int64 offset, net::IOBuffer* buf, // Copy the operation parameters. operation_ = op; offset_ = offset; - user_buf_ = buf ? new net::ReusedIOBuffer(buf, buf_len) : NULL; + user_buf_ = buf ? new net::DrainableIOBuffer(buf, buf_len) : NULL; buf_len_ = buf_len; user_callback_ = callback; @@ -693,7 +693,7 @@ void SparseControl::DoChildIOCompleted(int result) { // We'll be reusing the user provided buffer for the next chunk. if (buf_len_ && user_buf_) - user_buf_->SetOffset(result_); + user_buf_->DidConsume(result); } void SparseControl::OnChildIOCompleted(int result) { |