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

Unified Diff: base/message_loop.h

Issue 8212006: base::Bind: Cleanup in automation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mac build fix. Created 9 years, 2 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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.h
diff --git a/base/message_loop.h b/base/message_loop.h
index 29c736c25aafdaaccbbc7b3e7d0b7554384cb2f4..adb58e3714ee34c4f1edea22308036f689d59819 100644
--- a/base/message_loop.h
+++ b/base/message_loop.h
@@ -242,11 +242,10 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
// messages. This method may only be called on the same thread that called
// Run, and Run must still be on the call stack.
//
- // Use QuitTask if you need to Quit another thread's MessageLoop, but note
- // that doing so is fairly dangerous if the target thread makes nested calls
- // to MessageLoop::Run. The problem being that you won't know which nested
- // run loop you are quiting, so be careful!
- //
+ // Use QuitTask or QuitClosure if you need to Quit another thread's
+ // MessageLoop, but note that doing so is fairly dangerous if the target
+ // thread makes nested calls to MessageLoop::Run. The problem being that you
+ // won't know which nested run loop you are quitting, so be careful!
void Quit();
// This method is a variant of Quit, that does not wait for pending messages
@@ -255,6 +254,7 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
// Invokes Quit on the current MessageLoop when run. Useful to schedule an
// arbitrary MessageLoop to Quit.
+ // TODO(jhawkins): Remove once task.h is removed.
class QuitTask : public Task {
public:
virtual void Run() {
@@ -262,6 +262,10 @@ class BASE_EXPORT MessageLoop : public base::MessagePump::Delegate {
}
};
+ // Invokes Quit on the current MessageLoop when run. Useful to schedule an
+ // arbitrary MessageLoop to Quit.
+ static base::Closure QuitClosure();
+
// Returns the type passed to the constructor.
Type type() const { return type_; }
« no previous file with comments | « no previous file | base/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698