Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef CHROME_RENDERER_NET_MOCKABLE_ONE_SHOT_TIMER_H_ | |
| 6 #define CHROME_RENDERER_NET_MOCKABLE_ONE_SHOT_TIMER_H_ | |
| 7 | |
| 8 #include <base/callback.h> | |
| 9 #include <base/timer/timer.h> | |
| 10 | |
| 11 class MockableOneShotTimer { | |
|
Randy Smith (Not in Mondays)
2014/02/06 16:47:16
It might be worthwhile tossing an email at whoever
| |
| 12 public: | |
| 13 MockableOneShotTimer(); | |
| 14 virtual ~MockableOneShotTimer(); | |
| 15 virtual void Start(const tracked_objects::Location& posted_from, | |
| 16 base::TimeDelta delay, | |
| 17 const base::Closure& user_task); | |
|
mmenke
2014/02/05 23:31:43
Maybe just task? "user" seems ambiguous. Same fo
Elly Fong-Jones
2014/02/10 21:42:06
Done.
| |
| 18 virtual void Stop(); | |
| 19 virtual bool IsRunning() const; | |
| 20 private: | |
|
mmenke
2014/02/05 23:31:43
nit: Linebreak before private.
Elly Fong-Jones
2014/02/10 21:42:06
Done.
| |
| 21 void Fired(); | |
|
mmenke
2014/02/05 23:31:43
Blank line between methofs and values.
Elly Fong-Jones
2014/02/10 21:42:06
Done.
| |
| 22 base::OneShotTimer<MockableOneShotTimer> timer_; | |
| 23 base::Closure user_task_; | |
|
mmenke
2014/02/05 23:31:43
DISALLOW_COPY_AND_ASSIGN + relevant header?
Elly Fong-Jones
2014/02/10 21:42:06
Done.
| |
| 24 }; | |
| 25 | |
| 26 #endif // CHROME_RENDERER_NET_MOCKABLE_ONE_SHOT_TIMER_H_ | |
| OLD | NEW |