Index: ios/web/public/web_thread.h |
diff --git a/ios/web/public/web_thread.h b/ios/web/public/web_thread.h |
index 1f44d6311e4205231fe6694645fd6f3f7780a695..99f41c35014009a9373d597765ce7bc2a1d97fe0 100644 |
--- a/ios/web/public/web_thread.h |
+++ b/ios/web/public/web_thread.h |
@@ -11,7 +11,6 @@ |
#include "base/compiler_specific.h" |
#include "base/logging.h" |
#include "base/macros.h" |
-#include "base/message_loop/message_loop_proxy.h" |
#include "base/task_runner_util.h" |
namespace base { |
@@ -84,8 +83,8 @@ class WebThread { |
// NOTE: do not add new threads here that are only used by a small number of |
// files. Instead you should just use a Thread class and pass its |
- // MessageLoopProxy around. Named threads there are only for threads that |
- // are used in many places. |
+ // SingleThreadTaskRunner around. Named threads there are only for threads |
+ // that are used in many places. |
// This identifier does not represent a thread. Instead it counts the |
// number of well-known threads. Insert new well-known threads before this |
@@ -124,18 +123,17 @@ class WebThread { |
const tracked_objects::Location& from_here, |
const base::Callback<ReturnType(void)>& task, |
const base::Callback<void(ReplyArgType)>& reply) { |
- scoped_refptr<base::MessageLoopProxy> message_loop_proxy = |
- GetMessageLoopProxyForThread(identifier); |
- return base::PostTaskAndReplyWithResult(message_loop_proxy.get(), from_here, |
- task, reply); |
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner = |
+ GetTaskRunnerForThread(identifier); |
+ return base::PostTaskAndReplyWithResult(task_runner.get(), from_here, task, |
+ reply); |
} |
template <class T> |
static bool DeleteSoon(ID identifier, |
const tracked_objects::Location& from_here, |
const T* object) { |
- return GetMessageLoopProxyForThread(identifier) |
- ->DeleteSoon(from_here, object); |
+ return GetTaskRunnerForThread(identifier)->DeleteSoon(from_here, object); |
} |
// Simplified wrappers for posting to the blocking thread pool. Use this |
@@ -202,9 +200,9 @@ class WebThread { |
// sets identifier to its ID. |
static bool GetCurrentThreadIdentifier(ID* identifier) WARN_UNUSED_RESULT; |
- // Callers can hold on to a refcounted MessageLoopProxy beyond the lifetime |
- // of the thread. |
- static scoped_refptr<base::MessageLoopProxy> GetMessageLoopProxyForThread( |
+ // Callers can hold on to a refcounted SingleThreadTaskRunner beyond the |
+ // lifetime of the thread. |
+ static scoped_refptr<base::SingleThreadTaskRunner> GetTaskRunnerForThread( |
ID identifier); |
// Returns an appropriate error message for when |