| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "media/cast/test/skewed_single_thread_task_runner.h" | 5 #include "media/cast/test/skewed_single_thread_task_runner.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/time/tick_clock.h" | 10 #include "base/time/tick_clock.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 bool SkewedSingleThreadTaskRunner::PostDelayedTask( | 29 bool SkewedSingleThreadTaskRunner::PostDelayedTask( |
| 30 const tracked_objects::Location& from_here, | 30 const tracked_objects::Location& from_here, |
| 31 base::OnceClosure task, | 31 base::OnceClosure task, |
| 32 base::TimeDelta delay) { | 32 base::TimeDelta delay) { |
| 33 return task_runner_->PostDelayedTask( | 33 return task_runner_->PostDelayedTask( |
| 34 from_here, std::move(task), | 34 from_here, std::move(task), |
| 35 base::TimeDelta::FromMicroseconds(delay.InMicroseconds() * skew_)); | 35 base::TimeDelta::FromMicroseconds(delay.InMicroseconds() * skew_)); |
| 36 } | 36 } |
| 37 | 37 |
| 38 bool SkewedSingleThreadTaskRunner::RunsTasksOnCurrentThread() const { | 38 bool SkewedSingleThreadTaskRunner::RunsTasksInCurrentSequence() const { |
| 39 return task_runner_->RunsTasksOnCurrentThread(); | 39 return task_runner_->RunsTasksInCurrentSequence(); |
| 40 } | 40 } |
| 41 | 41 |
| 42 bool SkewedSingleThreadTaskRunner::PostNonNestableDelayedTask( | 42 bool SkewedSingleThreadTaskRunner::PostNonNestableDelayedTask( |
| 43 const tracked_objects::Location& from_here, | 43 const tracked_objects::Location& from_here, |
| 44 base::OnceClosure task, | 44 base::OnceClosure task, |
| 45 base::TimeDelta delay) { | 45 base::TimeDelta delay) { |
| 46 return task_runner_->PostNonNestableDelayedTask( | 46 return task_runner_->PostNonNestableDelayedTask( |
| 47 from_here, std::move(task), | 47 from_here, std::move(task), |
| 48 base::TimeDelta::FromMicroseconds(delay.InMicroseconds() * skew_)); | 48 base::TimeDelta::FromMicroseconds(delay.InMicroseconds() * skew_)); |
| 49 } | 49 } |
| 50 | 50 |
| 51 } // namespace test | 51 } // namespace test |
| 52 } // namespace cast | 52 } // namespace cast |
| 53 } // namespace media | 53 } // namespace media |
| OLD | NEW |