Index: chrome/renderer/net/mockable_one_shot_timer.h |
diff --git a/chrome/renderer/net/mockable_one_shot_timer.h b/chrome/renderer/net/mockable_one_shot_timer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6f1238a90d9c84f7b8e729fe4ed09ee7b8d0a2f3 |
--- /dev/null |
+++ b/chrome/renderer/net/mockable_one_shot_timer.h |
@@ -0,0 +1,31 @@ |
+// 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. |
+ |
+#ifndef CHROME_RENDERER_NET_MOCKABLE_ONE_SHOT_TIMER_H_ |
+#define CHROME_RENDERER_NET_MOCKABLE_ONE_SHOT_TIMER_H_ |
+ |
+#include <base/callback.h> |
+#include <base/macros.h> |
+#include <base/timer/timer.h> |
mmenke
2014/02/14 17:56:10
These should all use quotes.
Elly Fong-Jones
2014/02/25 19:19:52
Done.
|
+ |
+class MockableOneShotTimer { |
+ public: |
+ MockableOneShotTimer(); |
+ virtual ~MockableOneShotTimer(); |
+ virtual void Start(const tracked_objects::Location& posted_from, |
+ base::TimeDelta delay, |
+ const base::Closure& task); |
+ virtual void Stop(); |
+ virtual bool IsRunning() const; |
mmenke
2014/02/14 17:56:10
Maybe a comment that these all mirror base::OneSho
Elly Fong-Jones
2014/02/25 19:19:52
Done.
|
+ |
+ private: |
+ void Fired(); |
+ |
+ base::OneShotTimer<MockableOneShotTimer> timer_; |
+ base::Closure task_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MockableOneShotTimer); |
+}; |
+ |
+#endif // CHROME_RENDERER_NET_MOCKABLE_ONE_SHOT_TIMER_H_ |