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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc

Issue 2386653002: Replace base::Callback with base::OnceCallback in base::PendingTask (Closed)
Patch Set: rebase 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
« no previous file with comments | « components/timers/alarm_timer_chromeos.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
index 7def64ac93093b72ead7c15b75b697fc0de71f4e..5085d5de0b8a89bbcc9414053347647857598974 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_manager.cc
@@ -319,8 +319,11 @@ TaskQueueManager::ProcessTaskResult TaskQueueManager::ProcessTaskFromWorkQueue(
// arbitrarily delayed so the additional delay should not be a problem.
// TODO(skyostil): Figure out a way to not forget which task queue the
// task is associated with. See http://crbug.com/522843.
+ // TODO(tzik): Remove base::UnsafeConvertOnceClosureToRepeating once
+ // TaskRunners have migrated to OnceClosure.
delegate_->PostNonNestableTask(pending_task.posted_from,
- std::move(pending_task.task));
+ base::UnsafeConvertOnceClosureToRepeating(
dcheng 2016/10/14 02:35:02 Can we just define UnsafeConvert directly here ins
tzik 2016/10/14 05:07:43 Done.
+ std::move(pending_task.task)));
return ProcessTaskResult::DEFERRED;
}
@@ -341,7 +344,7 @@ TaskQueueManager::ProcessTaskResult TaskQueueManager::ProcessTaskFromWorkQueue(
internal::TaskQueueImpl* prev_executing_task_queue =
currently_executing_task_queue_;
currently_executing_task_queue_ = queue;
- task_annotator_.RunTask("TaskQueueManager::PostTask", pending_task);
+ task_annotator_.RunTask("TaskQueueManager::PostTask", &pending_task);
// Detect if the TaskQueueManager just got deleted. If this happens we must
// not access any member variables after this point.
if (protect->HasOneRef())
« no previous file with comments | « components/timers/alarm_timer_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698