Index: base/test/test_simple_task_runner.cc |
diff --git a/base/test/test_simple_task_runner.cc b/base/test/test_simple_task_runner.cc |
index cabd83c56cfd53411c067ea343c90ae51bfc068f..94d8e4834a3b7641296522021cbca850c6a95404 100644 |
--- a/base/test/test_simple_task_runner.cc |
+++ b/base/test/test_simple_task_runner.cc |
@@ -38,9 +38,9 @@ bool TestSimpleTaskRunner::RunsTasksOnCurrentThread() const { |
return thread_ref_ == PlatformThread::CurrentRef(); |
} |
-std::deque<TestPendingTask> TestSimpleTaskRunner::GetPendingTasks() const { |
+std::deque<TestPendingTask> TestSimpleTaskRunner::TakePendingTasks() { |
AutoLock auto_lock(lock_); |
- return pending_tasks_; |
+ return std::move(pending_tasks_); |
} |
size_t TestSimpleTaskRunner::NumPendingTasks() const { |
@@ -58,6 +58,11 @@ base::TimeDelta TestSimpleTaskRunner::NextPendingTaskDelay() const { |
return pending_tasks_.front().GetTimeToRun() - base::TimeTicks(); |
} |
+base::TimeDelta TestSimpleTaskRunner::FinalPendingTaskDelay() const { |
+ AutoLock auto_lock(lock_); |
+ return pending_tasks_.back().GetTimeToRun() - base::TimeTicks(); |
+} |
+ |
void TestSimpleTaskRunner::ClearPendingTasks() { |
AutoLock auto_lock(lock_); |
pending_tasks_.clear(); |