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

Unified Diff: media/cast/test/skewed_single_thread_task_runner.cc

Issue 2122543002: Replace Closure in TaskRunner::PostTask with OneShotCallback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@07_oneshot
Patch Set: fix Created 4 years, 3 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: media/cast/test/skewed_single_thread_task_runner.cc
diff --git a/media/cast/test/skewed_single_thread_task_runner.cc b/media/cast/test/skewed_single_thread_task_runner.cc
index fda7dfbfcad16575447c6975538d76c5915e8281..b08b456525452e07448423b86cafe4fc3850c6b2 100644
--- a/media/cast/test/skewed_single_thread_task_runner.cc
+++ b/media/cast/test/skewed_single_thread_task_runner.cc
@@ -26,11 +26,10 @@ void SkewedSingleThreadTaskRunner::SetSkew(double skew) {
bool SkewedSingleThreadTaskRunner::PostDelayedTask(
const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::OnceClosure task,
base::TimeDelta delay) {
return task_runner_->PostDelayedTask(
- from_here,
- task,
+ from_here, std::move(task),
base::TimeDelta::FromMicroseconds(delay.InMicroseconds() * skew_));
}
@@ -40,11 +39,10 @@ bool SkewedSingleThreadTaskRunner::RunsTasksOnCurrentThread() const {
bool SkewedSingleThreadTaskRunner::PostNonNestableDelayedTask(
const tracked_objects::Location& from_here,
- const base::Closure& task,
+ base::OnceClosure task,
base::TimeDelta delay) {
return task_runner_->PostNonNestableDelayedTask(
- from_here,
- task,
+ from_here, std::move(task),
base::TimeDelta::FromMicroseconds(delay.InMicroseconds() * skew_));
}
« no previous file with comments | « media/cast/test/skewed_single_thread_task_runner.h ('k') | mojo/public/cpp/bindings/tests/bind_task_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698