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

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: 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..fcf82c85370ec79ad86f4c7cceb42ebf6bd05310
--- /dev/null
+++ b/chrome/renderer/net/mockable_one_shot_timer.h
@@ -0,0 +1,26 @@
+// 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/timer/timer.h>
+
+class MockableOneShotTimer {
Randy Smith (Not in Mondays) 2014/02/06 16:47:16 It might be worthwhile tossing an email at whoever
+ public:
+ MockableOneShotTimer();
+ virtual ~MockableOneShotTimer();
+ virtual void Start(const tracked_objects::Location& posted_from,
+ base::TimeDelta delay,
+ 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.
+ virtual void Stop();
+ virtual bool IsRunning() const;
+ private:
mmenke 2014/02/05 23:31:43 nit: Linebreak before private.
Elly Fong-Jones 2014/02/10 21:42:06 Done.
+ 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.
+ base::OneShotTimer<MockableOneShotTimer> timer_;
+ 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.
+};
+
+#endif // CHROME_RENDERER_NET_MOCKABLE_ONE_SHOT_TIMER_H_

Powered by Google App Engine
This is Rietveld 408576698