Replace base::Callback with base::OnceCallback in base::PendingTask
After this CL, PendingTask holds the posted task as OnceClosure. And to
do that, PendingTasks get non-const on a task invocation, due to the
mutation the posted task for the consumption by the task invocation.
BUG=554299
Review-Url: https://codereview.chromium.org/2386653002
Cr-Original-Commit-Position: refs/heads/master@{#425318}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 739ffe3fd7b83bcb9ef7eb2e4b5c52fdbf35f59d
diff --git a/alarm_timer_chromeos.cc b/alarm_timer_chromeos.cc
index ce49e33..601b411 100644
--- a/alarm_timer_chromeos.cc
+++ b/alarm_timer_chromeos.cc
@@ -131,7 +131,8 @@
// Run the task.
TRACE_TASK_EXECUTION("AlarmTimer::OnTimerFired", *pending_user_task);
- base::debug::TaskAnnotator().RunTask("AlarmTimer::Reset", *pending_user_task);
+ base::debug::TaskAnnotator().RunTask("AlarmTimer::Reset",
+ pending_user_task.get());
// If the timer wasn't deleted, stopped or reset by the callback, reset or
// stop it.