diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-06 18:33:22 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-06 18:33:22 +0000 |
commit | 6bfe8f702dcce655b3a6073f5f652ba75c0cf20d (patch) | |
tree | 155e33b868362b133cb25de2fa5b94aede43481b /chrome/browser/metrics/thread_watcher.cc | |
parent | 39b2b7e8d4d4121e431ec1e5cc30ced3f72f39f6 (diff) | |
download | chromium_src-6bfe8f702dcce655b3a6073f5f652ba75c0cf20d.zip chromium_src-6bfe8f702dcce655b3a6073f5f652ba75c0cf20d.tar.gz chromium_src-6bfe8f702dcce655b3a6073f5f652ba75c0cf20d.tar.bz2 |
Revert 255322 "ThreadWatcher: fixes Start/StopWatchingAll."
> ThreadWatcher: fixes Start/StopWatchingAll.
>
> Start is deferred in relation to Stop, and when they're both called
> within the Start interval, the end result was started.
>
> BUG=347887
> TEST=unit_tests --gtest_filter=ThreadWatcherList*
>
> Review URL: https://codereview.chromium.org/183063007
BUG=347887,349987
TBR=bulach@chromium.org
Review URL: https://codereview.chromium.org/188643006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255401 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics/thread_watcher.cc')
-rw-r--r-- | chrome/browser/metrics/thread_watcher.cc | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/chrome/browser/metrics/thread_watcher.cc b/chrome/browser/metrics/thread_watcher.cc index 8246b3e..1737593 100644 --- a/chrome/browser/metrics/thread_watcher.cc +++ b/chrome/browser/metrics/thread_watcher.cc @@ -409,8 +409,6 @@ bool ThreadWatcher::IsVeryUnresponsive() { // 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 @@ void ThreadWatcherList::StartWatchingAll(const CommandLine& command_line) { 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 @@ void ThreadWatcherList::InitializeAndStartWatching( 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 @@ void ThreadWatcherList::DeleteAll() { } DCHECK(WatchDogThread::CurrentlyOnWatchDogThread()); - - SetStopped(true); - if (!g_thread_watcher_list_) return; @@ -740,12 +725,6 @@ ThreadWatcher* ThreadWatcherList::Find(const BrowserThread::ID& thread_id) { return it->second; } -// static -void ThreadWatcherList::SetStopped(bool stopped) { - DCHECK(WatchDogThread::CurrentlyOnWatchDogThread()); - g_stopped_ = stopped; -} - // ThreadWatcherObserver methods and members. // // static |