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

Unified Diff: base/test/scoped_task_scheduler.cc

Issue 2637843002: Migrate base::TaskRunner from Closure to OnceClosure (Closed)
Patch Set: rebase Created 3 years, 8 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/null_task_runner.cc ('k') | base/test/test_mock_time_task_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/scoped_task_scheduler.cc
diff --git a/base/test/scoped_task_scheduler.cc b/base/test/scoped_task_scheduler.cc
index dbf49365a389f3ce5022c462dab56466ce1bbcf1..4020e0e82a36df6f8d76229b473d4e615bbe280a 100644
--- a/base/test/scoped_task_scheduler.cc
+++ b/base/test/scoped_task_scheduler.cc
@@ -49,7 +49,7 @@ class TestTaskScheduler : public TaskScheduler {
// TaskScheduler:
void PostDelayedTaskWithTraits(const tracked_objects::Location& from_here,
const TaskTraits& traits,
- Closure task,
+ OnceClosure task,
TimeDelta delay) override;
scoped_refptr<TaskRunner> CreateTaskRunnerWithTraits(
const TaskTraits& traits) override;
@@ -134,10 +134,10 @@ class TestTaskSchedulerTaskRunner : public SingleThreadTaskRunner {
// SingleThreadTaskRunner:
bool PostDelayedTask(const tracked_objects::Location& from_here,
- Closure closure,
+ OnceClosure closure,
TimeDelta delay) override;
bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
- Closure closure,
+ OnceClosure closure,
TimeDelta delay) override;
bool RunsTasksOnCurrentThread() const override;
@@ -167,7 +167,7 @@ TestTaskScheduler::~TestTaskScheduler() {
void TestTaskScheduler::PostDelayedTaskWithTraits(
const tracked_objects::Location& from_here,
const TaskTraits& traits,
- Closure task,
+ OnceClosure task,
TimeDelta delay) {
CreateTaskRunnerWithTraits(traits)->PostDelayedTask(from_here,
std::move(task), delay);
@@ -280,7 +280,7 @@ TestTaskSchedulerTaskRunner::TestTaskSchedulerTaskRunner(
bool TestTaskSchedulerTaskRunner::PostDelayedTask(
const tracked_objects::Location& from_here,
- Closure closure,
+ OnceClosure closure,
TimeDelta delay) {
auto task =
MakeUnique<internal::Task>(from_here, std::move(closure), traits_, delay);
@@ -293,7 +293,7 @@ bool TestTaskSchedulerTaskRunner::PostDelayedTask(
bool TestTaskSchedulerTaskRunner::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
- Closure closure,
+ OnceClosure closure,
TimeDelta delay) {
// Tasks are never nested within the task scheduler.
return PostDelayedTask(from_here, std::move(closure), delay);
« no previous file with comments | « base/test/null_task_runner.cc ('k') | base/test/test_mock_time_task_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698