Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: chrome/renderer/net/mockable_one_shot_timer.h

Issue 136203009: Support auto-reload on errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: More fixes Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..15a797e33fb33e36771011932e490c0ce5a93306
--- /dev/null
+++ b/chrome/renderer/net/mockable_one_shot_timer.h
@@ -0,0 +1,32 @@
+// 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"
+
+class MockableOneShotTimer {
+ public:
+ MockableOneShotTimer();
+ virtual ~MockableOneShotTimer();
mmenke 2014/03/04 17:26:25 optional: May want a blank line after the destruc
Elly Fong-Jones 2014/03/06 21:48:37 Done.
+ // This interface mirrors base::OneShotTimer.
+ virtual void Start(const tracked_objects::Location& posted_from,
+ base::TimeDelta delay,
+ const base::Closure& task);
+ virtual void Stop();
+ virtual bool IsRunning() const;
+
+ private:
+ void Fired();
+
+ base::OneShotTimer<MockableOneShotTimer> timer_;
+ base::Closure task_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockableOneShotTimer);
+};
+
+#endif // CHROME_RENDERER_NET_MOCKABLE_ONE_SHOT_TIMER_H_

Powered by Google App Engine
This is Rietveld 408576698