Chromium Code Reviews| Index: chrome/browser/metrics/thread_watcher.h |
| diff --git a/chrome/browser/metrics/thread_watcher.h b/chrome/browser/metrics/thread_watcher.h |
| index a92bae0aca8f86bd398ae56aea8c6bff6050312b..4d250a6d40e28a43f8a325e50a63e0e0732d1523 100644 |
| --- a/chrome/browser/metrics/thread_watcher.h |
| +++ b/chrome/browser/metrics/thread_watcher.h |
| @@ -102,6 +102,8 @@ class ThreadWatcher { |
| live_threads_threshold(live_threads_threshold_in) {} |
| }; |
| + virtual ~ThreadWatcher(); |
| + |
| // This method starts performing health check on the given |thread_id|. It |
| // will create ThreadWatcher object for the given |thread_id|, |thread_name|. |
| // |sleep_time| is the wait time between ping messages. |unresponsive_time| is |
| @@ -144,8 +146,6 @@ class ThreadWatcher { |
| // ping message is sent, to check if we have received pong message or not. |
| explicit ThreadWatcher(const WatchingParams& params); |
| - virtual ~ThreadWatcher(); |
| - |
| // This method activates the thread watching which starts ping/pong messaging. |
| virtual void ActivateThreadWatching(); |
| @@ -394,10 +394,8 @@ class ThreadWatcherList { |
| static void StopWatchingAll(); |
| // Register() stores a pointer to the given ThreadWatcher in a global map. |
| - static void Register(ThreadWatcher* watcher); |
| - |
| - // This method returns true if the ThreadWatcher object is registerd. |
| - static bool IsRegistered(const content::BrowserThread::ID thread_id); |
| + // Returns the pointer if it was successfully registered. |
|
Ilya Sherman
2016/09/01 20:30:25
nit: Please add ", null otherwise" to the end of t
Joshua LeVasseur
2016/09/01 21:28:22
Done.
|
| + static ThreadWatcher* Register(std::unique_ptr<ThreadWatcher> watcher); |
| // This method returns number of responsive and unresponsive watched threads. |
| static void GetStatusOfThreads(uint32_t* responding_thread_count, |