| Index: webkit/fileapi/file_writer_delegate.cc
|
| diff --git a/webkit/fileapi/file_writer_delegate.cc b/webkit/fileapi/file_writer_delegate.cc
|
| index a5da1c641e20d8a589f040062dcc9c2c030a3d1d..4294bc489a4068b7fa903c9afd1bcabb9820961e 100644
|
| --- a/webkit/fileapi/file_writer_delegate.cc
|
| +++ b/webkit/fileapi/file_writer_delegate.cc
|
| @@ -8,6 +8,7 @@
|
| #include "base/callback.h"
|
| #include "base/file_util_proxy.h"
|
| #include "base/message_loop.h"
|
| +#include "base/message_loop_proxy.h"
|
| #include "base/threading/thread_restrictions.h"
|
| #include "net/base/net_errors.h"
|
| #include "webkit/fileapi/file_system_context.h"
|
| @@ -33,8 +34,7 @@ class InitializeTask : public base::RefCountedThreadSafe<InitializeTask> {
|
| const FileSystemPath& path,
|
| FileSystemOperationContext* context,
|
| const InitializeTaskCallback& callback)
|
| - : origin_message_loop_proxy_(
|
| - base::MessageLoopProxy::current()),
|
| + : original_loop_(base::MessageLoopProxy::current()),
|
| error_code_(base::PLATFORM_FILE_OK),
|
| file_(file),
|
| path_(path),
|
| @@ -43,9 +43,9 @@ class InitializeTask : public base::RefCountedThreadSafe<InitializeTask> {
|
| DCHECK_EQ(false, callback.is_null());
|
| }
|
|
|
| - bool Start(scoped_refptr<base::MessageLoopProxy> message_loop_proxy,
|
| + bool Start(base::SequencedTaskRunner* task_runner,
|
| const tracked_objects::Location& from_here) {
|
| - return message_loop_proxy->PostTask(
|
| + return task_runner->PostTask(
|
| from_here,
|
| base::Bind(&InitializeTask::ProcessOnTargetThread, this));
|
| }
|
| @@ -67,12 +67,12 @@ class InitializeTask : public base::RefCountedThreadSafe<InitializeTask> {
|
| }
|
| if (!base::GetPlatformFileInfo(file_, &file_info_))
|
| error_code_ = base::PLATFORM_FILE_ERROR_FAILED;
|
| - origin_message_loop_proxy_->PostTask(
|
| + original_loop_->PostTask(
|
| FROM_HERE,
|
| base::Bind(&InitializeTask::RunCallback, this));
|
| }
|
|
|
| - scoped_refptr<base::MessageLoopProxy> origin_message_loop_proxy_;
|
| + scoped_refptr<base::MessageLoopProxy> original_loop_;
|
| base::PlatformFileError error_code_;
|
|
|
| base::PlatformFile file_;
|
| @@ -89,12 +89,12 @@ FileWriterDelegate::FileWriterDelegate(
|
| FileSystemOperation* file_system_operation,
|
| const FileSystemPath& path,
|
| int64 offset,
|
| - scoped_refptr<base::MessageLoopProxy> proxy)
|
| + base::SequencedTaskRunner* task_runner)
|
| : file_system_operation_(file_system_operation),
|
| file_(base::kInvalidPlatformFileValue),
|
| path_(path),
|
| offset_(offset),
|
| - proxy_(proxy),
|
| + task_runner_(task_runner),
|
| bytes_written_backlog_(0),
|
| bytes_written_(0),
|
| bytes_read_(0),
|
| @@ -141,7 +141,7 @@ void FileWriterDelegate::Start(base::PlatformFile file,
|
| file_system_operation_context(),
|
| base::Bind(&FileWriterDelegate::OnGetFileInfoAndCallStartUpdate,
|
| weak_factory_.GetWeakPtr()));
|
| - relay->Start(proxy_, FROM_HERE);
|
| + relay->Start(task_runner_, FROM_HERE);
|
| }
|
|
|
| void FileWriterDelegate::OnReceivedRedirect(net::URLRequest* request,
|
|
|