summaryrefslogtreecommitdiffstats
path: root/webkit/fileapi/file_system_url_request_job.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 08:51:38 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 08:51:38 +0000
commit5eb431e2dfe9d55eaff2acc7a3ea64f403dec669 (patch)
tree2dedc5eed71c34a111444dc341642a35ae3eb248 /webkit/fileapi/file_system_url_request_job.cc
parentd48a64ebbf54a6d87d82c3787e12f35439e1f62b (diff)
downloadchromium_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/fileapi/file_system_url_request_job.cc')
-rw-r--r--webkit/fileapi/file_system_url_request_job.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/fileapi/file_system_url_request_job.cc b/webkit/fileapi/file_system_url_request_job.cc
index 34fec21..8cdf9d4 100644
--- a/webkit/fileapi/file_system_url_request_job.cc
+++ b/webkit/fileapi/file_system_url_request_job.cc
@@ -4,6 +4,7 @@
#include "webkit/fileapi/file_system_url_request_job.h"
+#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/file_path.h"
#include "base/file_util_proxy.h"
@@ -107,8 +108,6 @@ FileSystemURLRequestJob::FileSystemURLRequestJob(
file_thread_proxy_(file_thread_proxy),
ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)),
ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)),
- ALLOW_THIS_IN_INITIALIZER_LIST(
- io_callback_(this, &FileSystemURLRequestJob::DidRead)),
stream_(NULL),
is_directory_(false),
remaining_bytes_(0) {
@@ -154,7 +153,9 @@ bool FileSystemURLRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size,
return true;
}
- int rv = stream_->Read(dest->data(), dest_size, &io_callback_);
+ int rv = stream_->Read(dest->data(), dest_size,
+ base::Bind(&FileSystemURLRequestJob::DidRead,
+ base::Unretained(this)));
if (rv >= 0) {
// Data is immediately available.
*bytes_read = rv;