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

Unified Diff: base/pending_task.h

Issue 1886453003: Make PendingTask move-only and pass it by value on retaining params (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mac test fix Created 4 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 | « base/message_loop/message_pump_perftest.cc ('k') | base/pending_task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/pending_task.h
diff --git a/base/pending_task.h b/base/pending_task.h
index c31ab9af264745c19042267d52aa0646edd83cb9..5761653397e0e5d011522f56e786fa1cbbbcc373 100644
--- a/base/pending_task.h
+++ b/base/pending_task.h
@@ -19,14 +19,16 @@ namespace base {
// for use by classes that queue and execute tasks.
struct BASE_EXPORT PendingTask : public TrackingInfo {
PendingTask(const tracked_objects::Location& posted_from,
- const Closure& task);
+ Closure task);
PendingTask(const tracked_objects::Location& posted_from,
- const Closure& task,
+ Closure task,
TimeTicks delayed_run_time,
bool nestable);
- PendingTask(const PendingTask& other);
+ PendingTask(PendingTask&& other);
~PendingTask();
+ PendingTask& operator=(PendingTask&& other);
+
// Used to support sorting.
bool operator<(const PendingTask& other) const;
« no previous file with comments | « base/message_loop/message_pump_perftest.cc ('k') | base/pending_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698