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

Side by Side Diff: chrome/browser/metrics/thread_watcher.cc

Issue 1102233002: favor DCHECK_CURRENTLY_ON for better logs in chrome/browser/media_galleries , metrics and nacl_host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/metrics/thread_watcher.h" 5 #include "chrome/browser/metrics/thread_watcher.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 340
341 ThreadWatcherList::CrashDataThresholds::CrashDataThresholds() 341 ThreadWatcherList::CrashDataThresholds::CrashDataThresholds()
342 : live_threads_threshold(kLiveThreadsThreshold), 342 : live_threads_threshold(kLiveThreadsThreshold),
343 unresponsive_threshold(kUnresponsiveCount) { 343 unresponsive_threshold(kUnresponsiveCount) {
344 } 344 }
345 345
346 // static 346 // static
347 void ThreadWatcherList::StartWatchingAll( 347 void ThreadWatcherList::StartWatchingAll(
348 const base::CommandLine& command_line) { 348 const base::CommandLine& command_line) {
349 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 349 DCHECK_CURRENTLY_ON(BrowserThread::UI);
350 uint32 unresponsive_threshold; 350 uint32 unresponsive_threshold;
351 CrashOnHangThreadMap crash_on_hang_threads; 351 CrashOnHangThreadMap crash_on_hang_threads;
352 ParseCommandLine(command_line, 352 ParseCommandLine(command_line,
353 &unresponsive_threshold, 353 &unresponsive_threshold,
354 &crash_on_hang_threads); 354 &crash_on_hang_threads);
355 355
356 ThreadWatcherObserver::SetupNotifications( 356 ThreadWatcherObserver::SetupNotifications(
357 base::TimeDelta::FromSeconds(kSleepSeconds * unresponsive_threshold)); 357 base::TimeDelta::FromSeconds(kSleepSeconds * unresponsive_threshold));
358 358
359 WatchDogThread::PostTask( 359 WatchDogThread::PostTask(
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 921
922 #if defined(OS_WIN) 922 #if defined(OS_WIN)
923 // On Windows XP, give twice the time for shutdown. 923 // On Windows XP, give twice the time for shutdown.
924 if (base::win::GetVersion() <= base::win::VERSION_XP) 924 if (base::win::GetVersion() <= base::win::VERSION_XP)
925 actual_duration *= 2; 925 actual_duration *= 2;
926 #endif 926 #endif
927 927
928 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); 928 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration);
929 shutdown_watchdog_->Arm(); 929 shutdown_watchdog_->Arm();
930 } 930 }
OLDNEW
« no previous file with comments | « chrome/browser/metrics/field_trial_synchronizer.cc ('k') | chrome/browser/metrics/thread_watcher_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698