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

Unified Diff: trunk/src/chrome/browser/metrics/thread_watcher.cc

Issue 188643006: Revert 255322 "ThreadWatcher: fixes Start/StopWatchingAll." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 9 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: trunk/src/chrome/browser/metrics/thread_watcher.cc
===================================================================
--- trunk/src/chrome/browser/metrics/thread_watcher.cc (revision 255400)
+++ trunk/src/chrome/browser/metrics/thread_watcher.cc (working copy)
@@ -409,8 +409,6 @@
// static
ThreadWatcherList* ThreadWatcherList::g_thread_watcher_list_ = NULL;
// static
-bool ThreadWatcherList::g_stopped_ = false;
-// static
const int ThreadWatcherList::kSleepSeconds = 1;
// static
const int ThreadWatcherList::kUnresponsiveSeconds = 2;
@@ -445,10 +443,6 @@
ThreadWatcherObserver::SetupNotifications(
base::TimeDelta::FromSeconds(kSleepSeconds * unresponsive_threshold));
- WatchDogThread::PostTask(
- FROM_HERE,
- base::Bind(&ThreadWatcherList::SetStopped, false));
-
WatchDogThread::PostDelayedTask(
FROM_HERE,
base::Bind(&ThreadWatcherList::InitializeAndStartWatching,
@@ -641,12 +635,6 @@
const CrashOnHangThreadMap& crash_on_hang_threads) {
DCHECK(WatchDogThread::CurrentlyOnWatchDogThread());
- // This method is deferred in relationship to its StopWatchingAll()
- // counterpart. If a previous initialization has already happened, or if
- // stop has been called, there's nothing left to do here.
- if (g_thread_watcher_list_ || g_stopped_)
- return;
-
ThreadWatcherList* thread_watcher_list = new ThreadWatcherList();
CHECK(thread_watcher_list);
@@ -712,9 +700,6 @@
}
DCHECK(WatchDogThread::CurrentlyOnWatchDogThread());
-
- SetStopped(true);
-
if (!g_thread_watcher_list_)
return;
@@ -740,12 +725,6 @@
return it->second;
}
-// static
-void ThreadWatcherList::SetStopped(bool stopped) {
- DCHECK(WatchDogThread::CurrentlyOnWatchDogThread());
- g_stopped_ = stopped;
-}
-
// ThreadWatcherObserver methods and members.
//
// static
« no previous file with comments | « trunk/src/chrome/browser/metrics/thread_watcher.h ('k') | trunk/src/chrome/browser/metrics/thread_watcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698