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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 8728035: Disarm StartupTimeBomb when it is deleted (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/metrics/thread_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 111993)
+++ chrome/browser/chrome_browser_main.cc (working copy)
@@ -657,6 +657,7 @@
: parameters_(parameters),
parsed_command_line_(parameters.command_line),
result_code_(content::RESULT_CODE_NORMAL_EXIT),
+ startup_watcher_(new StartupTimeBomb()),
shutdown_watcher_(new ShutdownWatcherHelper()),
record_search_engine_(false),
translate_manager_(NULL),
@@ -1751,10 +1752,6 @@
#endif // GOOGLE_CHROME_BUILD
#endif // OS_WIN
- // Start watching for hangs during startup. We disarm this hang detector when
- // ThreadWatcher takes over or when browser is shutdown.
- StartupTimeBomb::Arm(base::TimeDelta::FromSeconds(300));
-
// Configure modules that need access to resources.
net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
@@ -1850,6 +1847,11 @@
return chrome::RESULT_CODE_UNINSTALL_EXTENSION_ERROR;
}
+ // Start watching for hangs during startup. We disarm this hang detector when
+ // ThreadWatcher takes over or when browser is shutdown or when
+ // startup_watcher_ is deleted.
+ startup_watcher_->Arm(base::TimeDelta::FromSeconds(300));
+
// Start watching for a hang.
MetricsService::LogNeedForCleanShutdown();
@@ -2005,7 +2007,7 @@
shutdown_watcher_->Arm(base::TimeDelta::FromSeconds(90));
// Disarm the startup hang detector time bomb if it is still Arm'ed.
- StartupTimeBomb::Disarm();
+ startup_watcher_->Disarm();
#if defined(OS_WIN)
// If it's the first run, log the search engine chosen. We wait until
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/metrics/thread_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698