diff options
-rw-r--r-- | base/debug/trace_event_unittest.cc | 11 | ||||
-rw-r--r-- | base/files/file_path_watcher_browsertest.cc | 6 | ||||
-rw-r--r-- | base/files/file_path_watcher_linux.cc | 13 | ||||
-rw-r--r-- | base/files/file_path_watcher_mac.cc | 3 |
4 files changed, 17 insertions, 16 deletions
diff --git a/base/debug/trace_event_unittest.cc b/base/debug/trace_event_unittest.cc index c0c9380..0ccf440 100644 --- a/base/debug/trace_event_unittest.cc +++ b/base/debug/trace_event_unittest.cc @@ -682,8 +682,7 @@ TEST_F(TraceEventTestFixture, DataCapturedOnThread) { thread.Start(); thread.message_loop()->PostTask( - FROM_HERE, NewRunnableFunction(&TraceWithAllMacroVariants, - &task_complete_event)); + FROM_HERE, base::Bind(&TraceWithAllMacroVariants, &task_complete_event)); task_complete_event.Wait(); thread.Stop(); @@ -705,8 +704,8 @@ TEST_F(TraceEventTestFixture, DataCapturedManyThreads) { task_complete_events[i] = new WaitableEvent(false, false); threads[i]->Start(); threads[i]->message_loop()->PostTask( - FROM_HERE, NewRunnableFunction(&TraceManyInstantEvents, - i, num_events, task_complete_events[i])); + FROM_HERE, base::Bind(&TraceManyInstantEvents, + i, num_events, task_complete_events[i])); } for (int i = 0; i < num_threads; i++) { @@ -748,8 +747,8 @@ TEST_F(TraceEventTestFixture, ThreadNames) { threads[i]->Start(); thread_ids[i] = threads[i]->thread_id(); threads[i]->message_loop()->PostTask( - FROM_HERE, NewRunnableFunction(&TraceManyInstantEvents, - i, num_events, task_complete_events[i])); + FROM_HERE, base::Bind(&TraceManyInstantEvents, + i, num_events, task_complete_events[i])); } for (int i = 0; i < num_threads; i++) { task_complete_events[i]->Wait(); diff --git a/base/files/file_path_watcher_browsertest.cc b/base/files/file_path_watcher_browsertest.cc index e59f702..0dd1b69 100644 --- a/base/files/file_path_watcher_browsertest.cc +++ b/base/files/file_path_watcher_browsertest.cc @@ -14,6 +14,7 @@ #endif #include "base/basictypes.h" +#include "base/bind.h" #include "base/compiler_specific.h" #include "base/file_path.h" #include "base/file_util.h" @@ -47,9 +48,8 @@ class NotificationCollector // Called from the file thread by the delegates. void OnChange(TestDelegate* delegate) { loop_->PostTask(FROM_HERE, - NewRunnableMethod(this, - &NotificationCollector::RecordChange, - make_scoped_refptr(delegate))); + base::Bind(&NotificationCollector::RecordChange, this, + make_scoped_refptr(delegate))); } void Register(TestDelegate* delegate) { diff --git a/base/files/file_path_watcher_linux.cc b/base/files/file_path_watcher_linux.cc index c85202c..ab4cd41 100644 --- a/base/files/file_path_watcher_linux.cc +++ b/base/files/file_path_watcher_linux.cc @@ -16,6 +16,7 @@ #include <utility> #include <vector> +#include "base/bind.h" #include "base/eintr_wrapper.h" #include "base/file_path.h" #include "base/file_util.h" @@ -317,12 +318,12 @@ void FilePathWatcherImpl::OnFilePathChanged( if (!message_loop()->BelongsToCurrentThread()) { // Switch to message_loop_ to access watches_ safely. message_loop()->PostTask(FROM_HERE, - NewRunnableMethod(this, - &FilePathWatcherImpl::OnFilePathChanged, - fired_watch, - child, - created, - is_directory)); + base::Bind(&FilePathWatcherImpl::OnFilePathChanged, + this, + fired_watch, + child, + created, + is_directory)); return; } diff --git a/base/files/file_path_watcher_mac.cc b/base/files/file_path_watcher_mac.cc index c3b9351..3413e8a 100644 --- a/base/files/file_path_watcher_mac.cc +++ b/base/files/file_path_watcher_mac.cc @@ -10,6 +10,7 @@ #include <vector> +#include "base/bind.h" #include "base/file_util.h" #include "base/message_loop.h" #include "base/message_loop_proxy.h" @@ -463,7 +464,7 @@ void FilePathWatcherImpl::Cancel() { } if (!proxy->BelongsToCurrentThread()) { proxy->PostTask(FROM_HERE, - NewRunnableMethod(this, &FilePathWatcherImpl::Cancel)); + base::Bind(&FilePathWatcherImpl::Cancel, this)); return; } CancelOnMessageLoopThread(); |