Index: chrome/browser/metrics/thread_watcher.h |
=================================================================== |
--- chrome/browser/metrics/thread_watcher.h (revision 111993) |
+++ chrome/browser/metrics/thread_watcher.h (working copy) |
@@ -493,19 +493,31 @@ |
// startup. |
class StartupTimeBomb { |
public: |
+ // This singleton is instantiated when the browser process is launched. |
+ StartupTimeBomb(); |
+ |
+ // Destructor disarm's startup_watchdog_ (if it is arm'ed) so that alarm |
+ // doesn't go off. |
+ ~StartupTimeBomb(); |
+ |
// Constructs |startup_watchdog_| which spawns a thread and starts timer. |
// |duration| specifies how long |startup_watchdog_| will wait before it |
// calls alarm. |
- static void Arm(const base::TimeDelta& duration); |
+ void Arm(const base::TimeDelta& duration); |
// Disarms |startup_watchdog_| thread and then deletes it which stops the |
// Watchdog thread. |
- static void Disarm(); |
+ void Disarm(); |
private: |
+ friend class ThreadWatcherList; |
jar (doing other things)
2011/11/30 01:02:01
nit: Why do we need this friend? Aren't the signi
ramant (doing other things)
2011/11/30 05:14:53
Added a static method to disarm the startup timebo
|
+ |
// Watches for hangs during startup until it is disarm'ed. |
- static base::Watchdog* startup_watchdog_; |
+ base::Watchdog* startup_watchdog_; |
+ // The singleton of this class. |
+ static StartupTimeBomb* g_startup_timebomb_; |
+ |
DISALLOW_COPY_AND_ASSIGN(StartupTimeBomb); |
}; |