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

Unified Diff: base/test/test_pending_task.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/test/test_mock_time_task_runner.cc ('k') | base/test/test_pending_task.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_pending_task.h
diff --git a/base/test/test_pending_task.h b/base/test/test_pending_task.h
index 2dbdb7eeccbdcc1927dca53114258f83eb06e477..c8fdea39560c6a3ec1972b6bf8bcd8b5786380d1 100644
--- a/base/test/test_pending_task.h
+++ b/base/test/test_pending_task.h
@@ -21,13 +21,14 @@ struct TestPendingTask {
enum TestNestability { NESTABLE, NON_NESTABLE };
TestPendingTask();
- TestPendingTask(const TestPendingTask& other);
+ TestPendingTask(TestPendingTask&& other);
TestPendingTask(const tracked_objects::Location& location,
- const Closure& task,
+ OnceClosure task,
TimeTicks post_time,
TimeDelta delay,
TestNestability nestability);
~TestPendingTask();
+ TestPendingTask& operator=(TestPendingTask&& other);
// Returns post_time + delay.
TimeTicks GetTimeToRun() const;
@@ -51,7 +52,7 @@ struct TestPendingTask {
bool ShouldRunBefore(const TestPendingTask& other) const;
tracked_objects::Location location;
- Closure task;
+ mutable OnceClosure task;
TimeTicks post_time;
TimeDelta delay;
TestNestability nestability;
« no previous file with comments | « base/test/test_mock_time_task_runner.cc ('k') | base/test/test_pending_task.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698