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

Unified Diff: base/pending_task.h

Issue 2386653002: Replace base::Callback with base::OnceCallback in base::PendingTask (Closed)
Patch Set: revert most of task_scheduler changes Created 4 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
Index: base/pending_task.h
diff --git a/base/pending_task.h b/base/pending_task.h
index 5761653397e0e5d011522f56e786fa1cbbbcc373..0ca10e80756f9bd8fa4ae368482265c717dc6fb0 100644
--- a/base/pending_task.h
+++ b/base/pending_task.h
@@ -15,13 +15,14 @@
namespace base {
+using internal::OnceClosure;
fdoray 2016/10/06 17:37:22 Avoid using "using" in a header file.
tzik 2016/10/13 05:58:04 Removed. This is no longer needed after I moved it
+
// Contains data about a pending task. Stored in TaskQueue and DelayedTaskQueue
// for use by classes that queue and execute tasks.
struct BASE_EXPORT PendingTask : public TrackingInfo {
+ PendingTask(const tracked_objects::Location& posted_from, OnceClosure task);
PendingTask(const tracked_objects::Location& posted_from,
- Closure task);
- PendingTask(const tracked_objects::Location& posted_from,
- Closure task,
+ OnceClosure task,
TimeTicks delayed_run_time,
bool nestable);
PendingTask(PendingTask&& other);
@@ -33,7 +34,7 @@ struct BASE_EXPORT PendingTask : public TrackingInfo {
bool operator<(const PendingTask& other) const;
// The task to run.
- Closure task;
+ OnceClosure task;
// The site this PendingTask was posted from.
tracked_objects::Location posted_from;

Powered by Google App Engine
This is Rietveld 408576698