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 |