diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-12 08:51:38 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-12 08:51:38 +0000 |
commit | 5eb431e2dfe9d55eaff2acc7a3ea64f403dec669 (patch) | |
tree | 2dedc5eed71c34a111444dc341642a35ae3eb248 /webkit/blob | |
parent | d48a64ebbf54a6d87d82c3787e12f35439e1f62b (diff) | |
download | chromium_src-5eb431e2dfe9d55eaff2acc7a3ea64f403dec669.zip chromium_src-5eb431e2dfe9d55eaff2acc7a3ea64f403dec669.tar.gz chromium_src-5eb431e2dfe9d55eaff2acc7a3ea64f403dec669.tar.bz2 |
Switch FileStream to use new CompletionCallback.
BUG=98719
TEST=none
Review URL: http://codereview.chromium.org/8139019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob')
-rw-r--r-- | webkit/blob/blob_url_request_job.cc | 6 | ||||
-rw-r--r-- | webkit/blob/blob_url_request_job.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/webkit/blob/blob_url_request_job.cc b/webkit/blob/blob_url_request_job.cc index 15d86ac..a02096f 100644 --- a/webkit/blob/blob_url_request_job.cc +++ b/webkit/blob/blob_url_request_job.cc @@ -4,6 +4,7 @@ #include "webkit/blob/blob_url_request_job.h" +#include "base/bind.h" #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/file_util.h" @@ -54,8 +55,6 @@ BlobURLRequestJob::BlobURLRequestJob( callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), blob_data_(blob_data), file_thread_proxy_(file_thread_proxy), - ALLOW_THIS_IN_INITIALIZER_LIST( - io_callback_(this, &BlobURLRequestJob::DidRead)), item_index_(0), total_size_(0), current_item_offset_(0), @@ -355,7 +354,8 @@ bool BlobURLRequestJob::ReadFile(const BlobData::Item& item) { // Start the asynchronous reading. int rv = stream_->Read(read_buf_->data() + read_buf_offset_, bytes_to_read_, - &io_callback_); + base::Bind(&BlobURLRequestJob::DidRead, + base::Unretained(this))); // If I/O pending error is returned, we just need to wait. if (rv == net::ERR_IO_PENDING) { diff --git a/webkit/blob/blob_url_request_job.h b/webkit/blob/blob_url_request_job.h index 843d9ca..ff563b86 100644 --- a/webkit/blob/blob_url_request_job.h +++ b/webkit/blob/blob_url_request_job.h @@ -10,7 +10,6 @@ #include "base/memory/scoped_ptr.h" #include "base/platform_file.h" #include "base/task.h" -#include "net/base/completion_callback.h" #include "net/http/http_byte_range.h" #include "net/url_request/url_request_job.h" #include "webkit/blob/blob_data.h" @@ -72,7 +71,6 @@ class BlobURLRequestJob : public net::URLRequestJob { base::ScopedCallbackFactory<BlobURLRequestJob> callback_factory_; scoped_refptr<BlobData> blob_data_; scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; - net::OldCompletionCallbackImpl<BlobURLRequestJob> io_callback_; std::vector<int64> item_length_list_; scoped_ptr<net::FileStream> stream_; size_t item_index_; |