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

Unified Diff: base/message_loop.cc

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 | « base/message_loop.h ('k') | chrome/browser/automation/automation_provider_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/message_loop.cc
diff --git a/base/message_loop.cc b/base/message_loop.cc
index ce5e900f8bd330434b7e4cf313f27e611d35ea94..f2e07b9fd1c4e8482b301e073bd33a5f1fb49b9f 100644
--- a/base/message_loop.cc
+++ b/base/message_loop.cc
@@ -306,7 +306,7 @@ void MessageLoop::PostNonNestableDelayedTask(
void MessageLoop::PostTask(
const tracked_objects::Location& from_here, const base::Closure& task) {
- CHECK(!task.is_null());
+ CHECK(!task.is_null()) << from_here.ToString();
PendingTask pending_task(task, from_here, CalculateDelayedRuntime(0), true);
AddToIncomingQueue(&pending_task);
}
@@ -314,7 +314,7 @@ void MessageLoop::PostTask(
void MessageLoop::PostDelayedTask(
const tracked_objects::Location& from_here, const base::Closure& task,
int64 delay_ms) {
- CHECK(!task.is_null());
+ CHECK(!task.is_null()) << from_here.ToString();
PendingTask pending_task(task, from_here,
CalculateDelayedRuntime(delay_ms), true);
AddToIncomingQueue(&pending_task);
@@ -322,7 +322,7 @@ void MessageLoop::PostDelayedTask(
void MessageLoop::PostNonNestableTask(
const tracked_objects::Location& from_here, const base::Closure& task) {
- CHECK(!task.is_null());
+ CHECK(!task.is_null()) << from_here.ToString();
PendingTask pending_task(task, from_here, CalculateDelayedRuntime(0), false);
AddToIncomingQueue(&pending_task);
}
@@ -330,7 +330,7 @@ void MessageLoop::PostNonNestableTask(
void MessageLoop::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here, const base::Closure& task,
int64 delay_ms) {
- CHECK(!task.is_null());
+ CHECK(!task.is_null()) << from_here.ToString();
PendingTask pending_task(task, from_here,
CalculateDelayedRuntime(delay_ms), false);
AddToIncomingQueue(&pending_task);
@@ -365,6 +365,12 @@ void MessageLoop::QuitNow() {
}
}
+// static
+base::Closure MessageLoop::QuitClosure() {
+ return base::Bind(&MessageLoop::Quit,
+ base::Unretained(MessageLoop::current()));
+}
+
void MessageLoop::SetNestableTasksAllowed(bool allowed) {
if (nestable_tasks_allowed_ != allowed) {
nestable_tasks_allowed_ = allowed;
« no previous file with comments | « base/message_loop.h ('k') | chrome/browser/automation/automation_provider_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698