| // Copyright 2014 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #include "base/timer/mock_timer.h" |
| MockTimer::MockTimer(bool retain_user_task, bool is_repeating) |
| : Timer(retain_user_task, is_repeating), |
| MockTimer::MockTimer(const Location& posted_from, |
| const base::Closure& user_task, |
| : Timer(true, is_repeating), delay_(delay), is_running_(false) {} |
| MockTimer::~MockTimer() = default; |
| bool MockTimer::IsRunning() const { |
| base::TimeDelta MockTimer::GetCurrentDelay() const { |
| void MockTimer::Start(const Location& posted_from, |
| const base::Closure& user_task) { |
| void MockTimer::Reset() { |
| DCHECK(!user_task_.is_null()); |
| base::Closure old_task = user_task_; |