| Index: webkit/tools/test_shell/simple_file_writer.cc
|
| diff --git a/webkit/tools/test_shell/simple_file_writer.cc b/webkit/tools/test_shell/simple_file_writer.cc
|
| index 8c07ccd08be004cf52d42686f856ac79a7b28911..595669604a796c5b9d4c7c799c2cb9f18989f042 100644
|
| --- a/webkit/tools/test_shell/simple_file_writer.cc
|
| +++ b/webkit/tools/test_shell/simple_file_writer.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "webkit/tools/test_shell/simple_file_writer.h"
|
|
|
| +#include "base/bind.h"
|
| #include "base/logging.h"
|
| #include "base/message_loop_proxy.h"
|
| #include "net/url_request/url_request_context.h"
|
| @@ -45,8 +46,9 @@ class SimpleFileWriter::IOThreadProxy
|
|
|
| void Truncate(const GURL& path, int64 offset) {
|
| if (!io_thread_->BelongsToCurrentThread()) {
|
| - io_thread_->PostTask(FROM_HERE, NewRunnableMethod(
|
| - this, &IOThreadProxy::Truncate, path, offset));
|
| + io_thread_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&IOThreadProxy::Truncate, this, path, offset));
|
| return;
|
| }
|
| DCHECK(!operation_);
|
| @@ -56,8 +58,9 @@ class SimpleFileWriter::IOThreadProxy
|
|
|
| void Write(const GURL& path, const GURL& blob_url, int64 offset) {
|
| if (!io_thread_->BelongsToCurrentThread()) {
|
| - io_thread_->PostTask(FROM_HERE, NewRunnableMethod(
|
| - this, &IOThreadProxy::Write, path, blob_url, offset));
|
| + io_thread_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&IOThreadProxy::Write, this, path, blob_url, offset));
|
| return;
|
| }
|
| DCHECK(request_context_);
|
| @@ -68,8 +71,9 @@ class SimpleFileWriter::IOThreadProxy
|
|
|
| void Cancel() {
|
| if (!io_thread_->BelongsToCurrentThread()) {
|
| - io_thread_->PostTask(FROM_HERE, NewRunnableMethod(
|
| - this, &IOThreadProxy::Cancel));
|
| + io_thread_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&IOThreadProxy::Cancel, this));
|
| return;
|
| }
|
| if (!operation_) {
|
| @@ -132,8 +136,9 @@ class SimpleFileWriter::IOThreadProxy
|
|
|
| void DidSucceed() {
|
| if (!main_thread_->BelongsToCurrentThread()) {
|
| - main_thread_->PostTask(FROM_HERE, NewRunnableMethod(
|
| - this, &IOThreadProxy::DidSucceed));
|
| + main_thread_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&IOThreadProxy::DidSucceed, this));
|
| return;
|
| }
|
| if (simple_writer_)
|
| @@ -142,8 +147,9 @@ class SimpleFileWriter::IOThreadProxy
|
|
|
| void DidFail(base::PlatformFileError error_code) {
|
| if (!main_thread_->BelongsToCurrentThread()) {
|
| - main_thread_->PostTask(FROM_HERE, NewRunnableMethod(
|
| - this, &IOThreadProxy::DidFail, error_code));
|
| + main_thread_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&IOThreadProxy::DidFail, this, error_code));
|
| return;
|
| }
|
| if (simple_writer_)
|
| @@ -152,8 +158,9 @@ class SimpleFileWriter::IOThreadProxy
|
|
|
| void DidWrite(int64 bytes, bool complete) {
|
| if (!main_thread_->BelongsToCurrentThread()) {
|
| - main_thread_->PostTask(FROM_HERE, NewRunnableMethod(
|
| - this, &IOThreadProxy::DidWrite, bytes, complete));
|
| + main_thread_->PostTask(
|
| + FROM_HERE,
|
| + base::Bind(&IOThreadProxy::DidWrite, this, bytes, complete));
|
| return;
|
| }
|
| if (simple_writer_)
|
|
|