diff options
author | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-07 04:10:10 +0000 |
---|---|---|
committer | kinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-07 04:10:10 +0000 |
commit | bcbd98de32206864af45a2c6a41bf76d8fcb7cf4 (patch) | |
tree | 4910e337917f638e0dc40eff160a0e573aefe54e /webkit/blob | |
parent | 58d9fe56a31875c85168c8b7264099900ea397b5 (diff) | |
download | chromium_src-bcbd98de32206864af45a2c6a41bf76d8fcb7cf4.zip chromium_src-bcbd98de32206864af45a2c6a41bf76d8fcb7cf4.tar.gz chromium_src-bcbd98de32206864af45a2c6a41bf76d8fcb7cf4.tar.bz2 |
Change webkit/{fileapi,quota} code to use TaskRunner.
BUG=123559
TEST=existing tests
Review URL: https://chromiumcodereview.appspot.com/10197007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@135616 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob')
-rw-r--r-- | webkit/blob/local_file_reader.cc | 8 | ||||
-rw-r--r-- | webkit/blob/local_file_reader.h | 7 |
2 files changed, 7 insertions, 8 deletions
diff --git a/webkit/blob/local_file_reader.cc b/webkit/blob/local_file_reader.cc index 8b5fb05..7de2686 100644 --- a/webkit/blob/local_file_reader.cc +++ b/webkit/blob/local_file_reader.cc @@ -8,8 +8,8 @@ #include "base/file_util_proxy.h" #include "base/location.h" #include "base/logging.h" -#include "base/message_loop_proxy.h" #include "base/platform_file.h" +#include "base/task_runner.h" #include "net/base/file_stream.h" #include "net/base/io_buffer.h" #include "net/base/net_errors.h" @@ -48,11 +48,11 @@ int LocalFileReader::PlatformFileErrorToNetError( } LocalFileReader::LocalFileReader( - base::MessageLoopProxy* file_thread_proxy, + base::TaskRunner* task_runner, const FilePath& file_path, int64 initial_offset, const base::Time& expected_modification_time) - : file_thread_proxy_(file_thread_proxy), + : task_runner_(task_runner), file_path_(file_path), initial_offset_(initial_offset), expected_modification_time_(expected_modification_time), @@ -74,7 +74,7 @@ int LocalFileReader::Read(net::IOBuffer* buf, int buf_len, int LocalFileReader::GetLength(const net::Int64CompletionCallback& callback) { const bool posted = base::FileUtilProxy::GetFileInfo( - file_thread_proxy_, file_path_, + task_runner_, file_path_, base::Bind(&LocalFileReader::DidGetFileInfoForGetLength, weak_factory_.GetWeakPtr(), callback)); DCHECK(posted); diff --git a/webkit/blob/local_file_reader.h b/webkit/blob/local_file_reader.h index 8f0508d..2bacedf 100644 --- a/webkit/blob/local_file_reader.h +++ b/webkit/blob/local_file_reader.h @@ -16,7 +16,7 @@ #include "webkit/blob/file_reader.h" namespace base { -class MessageLoopProxy; +class TaskRunner; } namespace webkit_blob { @@ -38,8 +38,7 @@ class BLOB_EXPORT LocalFileReader : public FileReader { // actual modification time to see if the file has been modified, and if // it does any succeeding read operations should fail with // ERR_UPLOAD_FILE_CHANGED error. - // TODO(kinuko): Consider using SequencedWorkerPool. - LocalFileReader(base::MessageLoopProxy* file_thread_proxy, + LocalFileReader(base::TaskRunner* task_runner, const FilePath& file_path, int64 initial_offset, const base::Time& expected_modification_time); @@ -76,7 +75,7 @@ class BLOB_EXPORT LocalFileReader : public FileReader { base::PlatformFileError error, const base::PlatformFileInfo& file_info); - scoped_refptr<base::MessageLoopProxy> file_thread_proxy_; + scoped_refptr<base::TaskRunner> task_runner_; scoped_ptr<net::FileStream> stream_impl_; const FilePath file_path_; const int64 initial_offset_; |