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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 10834015: Add Startup Timing to CPM (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Windows fix Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
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 adcb2f366181de34fb85c5084bf6f867a1759888..4bb499417457cd93e14dbaecdff2e46dfd9a42c0 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"
@@ -606,8 +607,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
@@ -618,10 +619,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.
+ performance_monitor::StartupTimer::PauseTimer();
+
Browser* browser = SessionRestore::RestoreSession(profile_,
NULL,
restore_behavior,
urls_to_open);
+
+ performance_monitor::StartupTimer::UnpauseTimer();
+
AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698