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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.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
Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
index f0758bae6e5793818902f518ec407e5c2d5a4072..b34de09676190fb2f20a655cb4303b20ca416964 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc
@@ -119,7 +119,7 @@ TaskQueueImpl::Task::Task()
}
TaskQueueImpl::Task::Task(const tracked_objects::Location& posted_from,
- base::Closure task,
+ base::OnceClosure task,
base::TimeTicks desired_run_time,
EnqueueOrder sequence_number,
bool nestable)
@@ -132,7 +132,7 @@ TaskQueueImpl::Task::Task(const tracked_objects::Location& posted_from,
}
TaskQueueImpl::Task::Task(const tracked_objects::Location& posted_from,
- base::Closure task,
+ base::OnceClosure task,
base::TimeTicks desired_run_time,
EnqueueOrder sequence_number,
bool nestable,
@@ -194,7 +194,7 @@ bool TaskQueueImpl::RunsTasksOnCurrentThread() const {
}
bool TaskQueueImpl::PostDelayedTask(const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) {
if (delay.is_zero())
return PostImmediateTaskImpl(from_here, std::move(task), TaskType::NORMAL);
@@ -205,7 +205,7 @@ bool TaskQueueImpl::PostDelayedTask(const tracked_objects::Location& from_here,
bool TaskQueueImpl::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay) {
if (delay.is_zero())
return PostImmediateTaskImpl(from_here, std::move(task),
@@ -217,7 +217,7 @@ bool TaskQueueImpl::PostNonNestableDelayedTask(
bool TaskQueueImpl::PostImmediateTaskImpl(
const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
TaskType task_type) {
DCHECK(task);
base::AutoLock lock(any_thread_lock_);
@@ -235,7 +235,7 @@ bool TaskQueueImpl::PostImmediateTaskImpl(
bool TaskQueueImpl::PostDelayedTaskImpl(
const tracked_objects::Location& from_here,
- base::Closure task,
+ base::OnceClosure task,
base::TimeDelta delay,
TaskType task_type) {
DCHECK(task);
@@ -332,7 +332,7 @@ void TaskQueueImpl::ScheduleDelayedWorkTask(Task pending_task) {
void TaskQueueImpl::PushOntoImmediateIncomingQueueLocked(
const tracked_objects::Location& posted_from,
- base::Closure task,
+ base::OnceClosure task,
base::TimeTicks desired_run_time,
EnqueueOrder sequence_number,
bool nestable) {

Powered by Google App Engine
This is Rietveld 408576698