Index: base/message_loop/message_loop_task_runner.h |
diff --git a/base/message_loop/message_loop_proxy_impl.h b/base/message_loop/message_loop_task_runner.h |
similarity index 60% |
rename from base/message_loop/message_loop_proxy_impl.h |
rename to base/message_loop/message_loop_task_runner.h |
index fa611c290853451f9779a9cb35699c7c94aff763..dc2947df26c618f8204581c55a807a57ad40df6a 100644 |
--- a/base/message_loop/message_loop_proxy_impl.h |
+++ b/base/message_loop/message_loop_task_runner.h |
@@ -2,13 +2,13 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_PROXY_IMPL_H_ |
-#define BASE_MESSAGE_LOOP_MESSAGE_LOOP_PROXY_IMPL_H_ |
+#ifndef BASE_MESSAGE_LOOP_MESSAGE_LOOP_TASK_RUNNER_H_ |
+#define BASE_MESSAGE_LOOP_MESSAGE_LOOP_TASK_RUNNER_H_ |
#include "base/base_export.h" |
#include "base/memory/ref_counted.h" |
-#include "base/message_loop/message_loop_proxy.h" |
#include "base/pending_task.h" |
+#include "base/single_thread_task_runner.h" |
#include "base/synchronization/lock.h" |
#include "base/threading/platform_thread.h" |
@@ -17,18 +17,18 @@ namespace internal { |
class IncomingTaskQueue; |
-// A stock implementation of MessageLoopProxy that is created and managed by a |
-// MessageLoop. For now a MessageLoopProxyImpl can only be created as part of a |
-// MessageLoop. |
-class BASE_EXPORT MessageLoopProxyImpl : public MessageLoopProxy { |
+// A stock implementation of SingleThreadTaskRunner that is created and managed |
+// by a MessageLoop. For now a MessageLoopTaskRunner can only be created as |
+// part of a MessageLoop. |
+class BASE_EXPORT MessageLoopTaskRunner : public SingleThreadTaskRunner { |
public: |
- explicit MessageLoopProxyImpl( |
+ explicit MessageLoopTaskRunner( |
scoped_refptr<IncomingTaskQueue> incoming_queue); |
- // Initialize this message loop proxy on the current thread. |
+ // Initialize this message loop task runner on the current thread. |
void BindToCurrentThread(); |
- // MessageLoopProxy implementation |
+ // SingleThreadTaskRunner implementation |
bool PostDelayedTask(const tracked_objects::Location& from_here, |
const base::Closure& task, |
base::TimeDelta delay) override; |
@@ -38,10 +38,10 @@ class BASE_EXPORT MessageLoopProxyImpl : public MessageLoopProxy { |
bool RunsTasksOnCurrentThread() const override; |
private: |
- friend class RefCountedThreadSafe<MessageLoopProxyImpl>; |
- ~MessageLoopProxyImpl() override; |
+ friend class RefCountedThreadSafe<MessageLoopTaskRunner>; |
+ ~MessageLoopTaskRunner() override; |
- // THe incoming queue receiving all posted tasks. |
+ // The incoming queue receiving all posted tasks. |
scoped_refptr<IncomingTaskQueue> incoming_queue_; |
// ID of the thread |this| was created on. Could be accessed on multiple |
@@ -49,10 +49,10 @@ class BASE_EXPORT MessageLoopProxyImpl : public MessageLoopProxy { |
PlatformThreadId valid_thread_id_; |
mutable Lock valid_thread_id_lock_; |
- DISALLOW_COPY_AND_ASSIGN(MessageLoopProxyImpl); |
+ DISALLOW_COPY_AND_ASSIGN(MessageLoopTaskRunner); |
}; |
} // namespace internal |
} // namespace base |
-#endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_PROXY_IMPL_H_ |
+#endif // BASE_MESSAGE_LOOP_MESSAGE_LOOP_TASK_RUNNER_H_ |