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

Unified Diff: base/message_loop/message_loop.h

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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/incoming_task_queue.cc ('k') | 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 1957b99d74648fc9f8abb1658e3ef59c25357838..7deb35332775f3c816f75f28982e14d2782f7945 100644
--- a/base/message_loop/message_loop.h
+++ b/base/message_loop/message_loop.h
@@ -205,10 +205,10 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
// NOTE: These methods may be called on any thread. The Task will be invoked
// on the thread that executes MessageLoop::Run().
void PostTask(const tracked_objects::Location& from_here,
- const Closure& task);
+ OnceClosure task);
void PostDelayedTask(const tracked_objects::Location& from_here,
- const Closure& task,
+ OnceClosure task,
TimeDelta delay);
// A variant on PostTask that deletes the given object. This is useful
@@ -410,7 +410,7 @@ class BASE_EXPORT MessageLoop : public MessagePump::Delegate {
debug::TaskAnnotator* task_annotator() { return &task_annotator_; }
// Runs the specified PendingTask.
- void RunTask(const PendingTask& pending_task);
+ void RunTask(PendingTask pending_task);
#if defined(OS_WIN)
// TODO (stanisc): crbug.com/596190: Remove this after the signaling issue
« no previous file with comments | « base/message_loop/incoming_task_queue.cc ('k') | base/message_loop/message_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698