Index: chrome/browser/metrics/thread_watcher.h |
diff --git a/chrome/browser/metrics/thread_watcher.h b/chrome/browser/metrics/thread_watcher.h |
index 2c4b027dcf609e48366401e5795571296e376ffa..7d817f858976640ef550aad04bc6c49e555e2d17 100644 |
--- a/chrome/browser/metrics/thread_watcher.h |
+++ b/chrome/browser/metrics/thread_watcher.h |
@@ -406,10 +406,12 @@ class ThreadWatcherList { |
private: |
// Allow tests to access our innards for testing purposes. |
friend class CustomThreadWatcher; |
+ friend class ThreadWatcherListTest; |
friend class ThreadWatcherTest; |
FRIEND_TEST_ALL_PREFIXES(ThreadWatcherTest, ThreadNamesOnlyArgs); |
FRIEND_TEST_ALL_PREFIXES(ThreadWatcherTest, ThreadNamesAndLiveThresholdArgs); |
FRIEND_TEST_ALL_PREFIXES(ThreadWatcherTest, CrashOnHangThreadsAllArgs); |
+ FRIEND_TEST_ALL_PREFIXES(ThreadWatcherListTest, Restart); |
ramant (doing other things)
2014/03/07 22:56:41
nit: please consider moving line 414 to before lin
bulach
2014/03/10 12:13:21
Done.
|
FRIEND_TEST_ALL_PREFIXES(ThreadWatcherAndroidTest, |
ramant (doing other things)
2014/03/07 22:56:41
nit: please consider moving lines 415-416 to after
bulach
2014/03/10 12:13:21
Done.
|
ApplicationStatusNotification); |
@@ -464,10 +466,19 @@ class ThreadWatcherList { |
// already registered, or to retrieve a pointer to it from the global map. |
static ThreadWatcher* Find(const content::BrowserThread::ID& thread_id); |
+ // Sets |g_stopped_| on the WatchDogThread. This is necessary to reflect the |
+ // state between the delayed |StartWatchingAll| and the immediate |
+ // |StopWatchingAll|. |
+ static void SetStopped(bool stopped); |
+ |
// The singleton of this class and is used to keep track of information about |
// threads that are being watched. |
static ThreadWatcherList* g_thread_watcher_list_; |
+ // StartWatchingAll() is delayed in relation to StopWatchingAll(), so if |
+ // a Stop comes first, prevent further initialization. |
+ static bool g_stopped_; |
+ |
// This is the wait time between ping messages. |
static const int kSleepSeconds; |