Chromium Code Reviews| Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| index b9e04d4008be5983c9f1df7e82d39e05a18d465f..31617029c02303e09da6827350f364134a3bf7e0 100644 |
| --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
| @@ -29,6 +29,7 @@ |
| #include "chrome/browser/net/predictor.h" |
| #include "chrome/browser/net/url_fixer_upper.h" |
| #include "chrome/browser/notifications/desktop_notification_service.h" |
| +#include "chrome/browser/performance_monitor/startup_timer.h" |
| #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| #include "chrome/browser/prefs/pref_service.h" |
| #include "chrome/browser/prefs/session_startup_pref.h" |
| @@ -598,8 +599,8 @@ bool StartupBrowserCreatorImpl::ProcessStartupURLs( |
| return false; |
| } |
| - uint32 restore_behavior = SessionRestore::SYNCHRONOUS | |
| - SessionRestore::ALWAYS_CREATE_TABBED_BROWSER; |
| + uint32 restore_behavior = SessionRestore::SYNCHRONOUS | |
| + SessionRestore::ALWAYS_CREATE_TABBED_BROWSER; |
| #if defined(OS_MACOSX) |
| // On Mac, when restoring a session with no windows, suppress the creation |
| // of a new window in the case where the system is launching Chrome via a |
| @@ -610,10 +611,18 @@ bool StartupBrowserCreatorImpl::ProcessStartupURLs( |
| } |
| #endif |
| + // Pause the StartupTimer. Since the restore here is synchronous, we can |
| + // keep these two metrics (browser startup time and session restore time) |
| + // separate. |
| + DCHECK(performance_monitor::StartupTimer::PauseTimer()); |
|
sky
2012/08/07 19:48:04
This structure means PauseTimer isn't invoked in r
Devlin
2012/08/07 22:51:22
D'oh! Was using that as a shortcut for "bool x = P
|
| + |
| Browser* browser = SessionRestore::RestoreSession(profile_, |
| NULL, |
| restore_behavior, |
| urls_to_open); |
| + |
| + DCHECK(performance_monitor::StartupTimer::UnpauseTimer()); |
| + |
| AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP); |
| return true; |
| } |