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

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: Requested changes added Created 8 years, 5 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 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;
}

Powered by Google App Engine
This is Rietveld 408576698