| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test/test_mock_time_task_runner.h" | 5 #include "base/test/test_mock_time_task_runner.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 return true; | 204 return true; |
| 205 } | 205 } |
| 206 | 206 |
| 207 bool TestMockTimeTaskRunner::PostNonNestableDelayedTask( | 207 bool TestMockTimeTaskRunner::PostNonNestableDelayedTask( |
| 208 const tracked_objects::Location& from_here, | 208 const tracked_objects::Location& from_here, |
| 209 const Closure& task, | 209 const Closure& task, |
| 210 TimeDelta delay) { | 210 TimeDelta delay) { |
| 211 return PostDelayedTask(from_here, task, delay); | 211 return PostDelayedTask(from_here, task, delay); |
| 212 } | 212 } |
| 213 | 213 |
| 214 std::string TestMockTimeTaskRunner::GetThreadName() const { |
| 215 return std::string(); |
| 216 } |
| 217 |
| 214 bool TestMockTimeTaskRunner::IsElapsingStopped() { | 218 bool TestMockTimeTaskRunner::IsElapsingStopped() { |
| 215 return false; | 219 return false; |
| 216 } | 220 } |
| 217 | 221 |
| 218 void TestMockTimeTaskRunner::OnBeforeSelectingTask() { | 222 void TestMockTimeTaskRunner::OnBeforeSelectingTask() { |
| 219 // Empty default implementation. | 223 // Empty default implementation. |
| 220 } | 224 } |
| 221 | 225 |
| 222 void TestMockTimeTaskRunner::OnAfterTimePassed() { | 226 void TestMockTimeTaskRunner::OnAfterTimePassed() { |
| 223 // Empty default implementation. | 227 // Empty default implementation. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 if (!tasks_.empty() && | 264 if (!tasks_.empty() && |
| 261 (tasks_.top().GetTimeToRun() - reference) <= max_delta) { | 265 (tasks_.top().GetTimeToRun() - reference) <= max_delta) { |
| 262 *next_task = tasks_.top(); | 266 *next_task = tasks_.top(); |
| 263 tasks_.pop(); | 267 tasks_.pop(); |
| 264 return true; | 268 return true; |
| 265 } | 269 } |
| 266 return false; | 270 return false; |
| 267 } | 271 } |
| 268 | 272 |
| 269 } // namespace base | 273 } // namespace base |
| OLD | NEW |