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

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

Issue 7839003: In Dev and Beta, give 10 mins for shutdown and in (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 | « no previous file | 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 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 ShutdownWatcherHelper::~ShutdownWatcherHelper() { 720 ShutdownWatcherHelper::~ShutdownWatcherHelper() {
721 if (shutdown_watchdog_) { 721 if (shutdown_watchdog_) {
722 shutdown_watchdog_->Disarm(); 722 shutdown_watchdog_->Disarm();
723 delete shutdown_watchdog_; 723 delete shutdown_watchdog_;
724 shutdown_watchdog_ = NULL; 724 shutdown_watchdog_ = NULL;
725 } 725 }
726 } 726 }
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 shutdown_watchdog_ = new ShutdownWatchDogThread(duration); 730 base::TimeDelta actual_duration = duration;
731 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
732 if (channel == chrome::VersionInfo::CHANNEL_STABLE) {
733 actual_duration *= 50;
734 } else if (channel == chrome::VersionInfo::CHANNEL_BETA ||
735 channel == chrome::VersionInfo::CHANNEL_DEV) {
736 actual_duration *= 25;
737 }
738 shutdown_watchdog_ = new ShutdownWatchDogThread(actual_duration);
731 shutdown_watchdog_->Arm(); 739 shutdown_watchdog_->Arm();
732 } 740 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698