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
3 // found in the LICENSE file.
5 #ifndef BASE_TIMER_MOCK_TIMER_H_
6 #define BASE_TIMER_MOCK_TIMER_H_
8 #include "base/timer/timer.h"
12 class BASE_EXPORT MockTimer
: public Timer
{
14 MockTimer(bool retain_user_task
, bool is_repeating
);
15 MockTimer(const tracked_objects::Location
& posted_from
,
17 const base::Closure
& user_task
,
21 // base::Timer implementation.
22 virtual bool IsRunning() const OVERRIDE
;
23 virtual base::TimeDelta
GetCurrentDelay() const OVERRIDE
;
24 virtual void Start(const tracked_objects::Location
& posted_from
,
25 base::TimeDelta delay
,
26 const base::Closure
& user_task
) OVERRIDE
;
27 virtual void Stop() OVERRIDE
;
28 virtual void Reset() OVERRIDE
;
34 base::Closure user_task_
;
41 #endif // !BASE_TIMER_MOCK_TIMER_H_