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

Side by Side Diff: base/task_scheduler/delayed_task_manager.cc

Issue 2791243002: Rewrite base::Bind into base::BindOnce on trivial cases in base (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 unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « base/task_runner_util.h ('k') | base/task_scheduler/scheduler_single_thread_task_runner_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698