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

Unified Diff: base/message_loop/message_loop.h

Issue 389653005: Introduce task_runner() accessors for both base::Thread and base::MessageLoop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 6 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/threading/thread.h » ('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 a65fbf5a760506f121c2a98bc67a083a2768d59d..330bde6d2e8da68dccf0c1af1fcfaf2a8d081138 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -295,10 +295,17 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
const std::string& thread_name() const { return thread_name_; }
// Gets the message loop proxy associated with this message loop.
+ //
+ // NOTE: Deprecated; prefer task_runner() and the TaskRunner interfaces
scoped_refptr<MessageLoopProxy> message_loop_proxy() {
return message_loop_proxy_;
}
+ // Gets the TaskRunner associated with this message loop.
+ scoped_refptr<SingleThreadTaskRunner> task_runner() {
+ return message_loop_proxy_;
+ }
+
// Enables or disables the recursive task processing. This happens in the case
// of recursive message loops. Some unwanted message loop may occurs when
// using common controls or printer functions. By default, recursive task
« no previous file with comments | « no previous file | base/threading/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698