OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/task_scheduler/delayed_task_manager.h" | 5 #include "base/task_scheduler/delayed_task_manager.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 const PostTaskNowCallback& post_task_now_callback) { | 27 const PostTaskNowCallback& post_task_now_callback) { |
28 DCHECK(task); | 28 DCHECK(task); |
29 DCHECK(task->task); | 29 DCHECK(task->task); |
30 | 30 |
31 const TimeDelta delay = task->delay; | 31 const TimeDelta delay = task->delay; |
32 DCHECK(!delay.is_zero()); | 32 DCHECK(!delay.is_zero()); |
33 | 33 |
34 // TODO(fdoray): Use |task->delayed_run_time| on the service thread | 34 // TODO(fdoray): Use |task->delayed_run_time| on the service thread |
35 // MessageLoop rather than recomputing it from |delay|. | 35 // MessageLoop rather than recomputing it from |delay|. |
36 service_thread_task_runner_->PostDelayedTask( | 36 service_thread_task_runner_->PostDelayedTask( |
37 FROM_HERE, Bind(post_task_now_callback, Passed(std::move(task))), delay); | 37 FROM_HERE, BindOnce(post_task_now_callback, Passed(std::move(task))), |
| 38 delay); |
38 } | 39 } |
39 | 40 |
40 } // namespace internal | 41 } // namespace internal |
41 } // namespace base | 42 } // namespace base |
OLD | NEW |