Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(551)

Unified Diff: base/message_loop/message_loop.h

Issue 1223193004: Revert of base: Make it possible to replace the MessageLoop's task runner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop/message_loop.h
diff --git a/base/message_loop/message_loop.h b/base/message_loop/message_loop.h
index 3445a77aa598c7de2159a8f8f5c4add2e376b24a..9429e6b7115a24c02dc32e7d32653dc1b75236ea 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -296,16 +296,9 @@
const std::string& thread_name() const { return thread_name_; }
// Gets the TaskRunner associated with this message loop.
- const scoped_refptr<SingleThreadTaskRunner>& task_runner() {
- return task_runner_;
- }
-
- // Sets a new TaskRunner for this message loop. The message loop must already
- // have been bound to a thread prior to this call, and the task runner must
- // belong to that thread. Note that changing the task runner will also affect
- // the ThreadTaskRunnerHandle for the target thread. Must be called on the
- // thread to which the message loop is bound.
- void SetTaskRunner(scoped_refptr<SingleThreadTaskRunner> task_runner);
+ // TODO(skyostil): Change this to return a const reference to a refptr
+ // once the internal type matches what is being returned (crbug.com/465354).
+ scoped_refptr<SingleThreadTaskRunner> task_runner() { return task_runner_; }
// Enables or disables the recursive task processing. This happens in the case
// of recursive message loops. Some unwanted message loop may occurs when
@@ -528,11 +521,8 @@
scoped_refptr<internal::IncomingTaskQueue> incoming_task_queue_;
- // A task runner which we haven't bound to a thread yet.
- scoped_refptr<internal::MessageLoopTaskRunner> unbound_task_runner_;
-
// The task runner associated with this message loop.
- scoped_refptr<SingleThreadTaskRunner> task_runner_;
+ scoped_refptr<internal::MessageLoopTaskRunner> task_runner_;
scoped_ptr<ThreadTaskRunnerHandle> thread_task_runner_handle_;
template <class T, class R> friend class base::subtle::DeleteHelperInternal;
« no previous file with comments | « no previous file | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698