base: Remove most uses of MessageLoopProxy
Replace most usage of MessageLoopProxy under base/ with SingleThreadTaskRunner
and ThreadTaskRunnerHandle (excluding the implementation of MessageLoopProxy
itself which will removed later).
This patch was mostly autogenerated with
https://codereview.chromium.org/1010073002.
Depends on https://codereview.chromium.org/1086733002/.
BUG=465354
TBR=nkostylev@chromium.org,pkasting@chromium.org,pauljensen@chromium.org
Review URL: https://codereview.chromium.org/1100773004
Cr-Commit-Position: refs/heads/master@{#327755}
CrOS-Libchrome-Original-Commit: 054861d0934c663de3cea933e1d65fd8319856a6
diff --git a/base/files/file_path_watcher.h b/base/files/file_path_watcher.h
index d26fa06..4f132af 100644
--- a/base/files/file_path_watcher.h
+++ b/base/files/file_path_watcher.h
@@ -12,7 +12,7 @@
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
-#include "base/message_loop/message_loop_proxy.h"
+#include "base/single_thread_task_runner.h"
namespace base {
@@ -58,12 +58,13 @@
// check |is_cancelled()| to avoid duplicate work.
virtual void CancelOnMessageLoopThread() = 0;
- scoped_refptr<base::MessageLoopProxy> message_loop() const {
- return message_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner() const {
+ return task_runner_;
}
- void set_message_loop(const scoped_refptr<base::MessageLoopProxy>& loop) {
- message_loop_ = loop;
+ void set_task_runner(
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
+ task_runner_ = task_runner.Pass();
}
// Must be called before the PlatformDelegate is deleted.
@@ -76,7 +77,7 @@
}
private:
- scoped_refptr<base::MessageLoopProxy> message_loop_;
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
bool cancelled_;
};