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

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

Issue 7782017: In Canary, crash the browser if shutdown takes longer 45 secs (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/debug/alias.h" 9 #include "base/debug/alias.h"
10 #include "base/string_tokenizer.h" 10 #include "base/string_tokenizer.h"
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 727
728 void ShutdownWatcherHelper::Arm(const base::TimeDelta& duration) { 728 void ShutdownWatcherHelper::Arm(const base::TimeDelta& duration) {
729 DCHECK(!shutdown_watchdog_); 729 DCHECK(!shutdown_watchdog_);
730 base::TimeDelta actual_duration = duration; 730 base::TimeDelta actual_duration = duration;
731 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); 731 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
732 if (channel == chrome::VersionInfo::CHANNEL_STABLE) { 732 if (channel == chrome::VersionInfo::CHANNEL_STABLE) {
733 actual_duration *= 50; 733 actual_duration *= 50;
734 } else if (channel == chrome::VersionInfo::CHANNEL_BETA || 734 } else if (channel == chrome::VersionInfo::CHANNEL_BETA ||
735 channel == chrome::VersionInfo::CHANNEL_DEV) { 735 channel == chrome::VersionInfo::CHANNEL_DEV) {
736 actual_duration *= 25; 736 actual_duration *= 25;
737 } else {
738 // In Canary, for Windows XP, give twice the time for shutdown.
739 #if defined(OS_WIN)
740 if (base::win::GetVersion() <= base::win::VERSION_XP)
741 actual_duration *= 2;
742 #endif
737 } 743 }
738 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration); 744 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration);
739 shutdown_watchdog_->Arm(); 745 shutdown_watchdog_->Arm();
740 } 746 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698