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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 14946003: Record first run startup metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Startup.FirstRun.BrowserMessageLoopStartTimeFromMainEntry --> Startup.BrowserMessageLoopStartTimeFr… Created 7 years, 7 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
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 45814a5aac04f301f2e6cd9462f4ae4d47a1c14a..829d7307ff813f08be8a805871fbfc6da38de03f 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -1625,7 +1625,7 @@ bool ChromeBrowserMainParts::MainMessageLoopRun(int* result_code) {
// These should be invoked as close to the start of the browser's
// UI thread message loop as possible to get a stable measurement
// across versions.
- RecordBrowserStartupTime();
+ RecordBrowserStartupTime(do_first_run_tasks_);
startup_timer_->SignalStartupComplete(
performance_monitor::StartupTimer::STARTUP_NORMAL);
@@ -1746,7 +1746,7 @@ void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
// Misc ------------------------------------------------------------------------
-void RecordBrowserStartupTime() {
+void RecordBrowserStartupTime(bool is_first_run) {
// Don't record any metrics if UI was displayed before this point e.g.
// warning dialogs.
if (startup_metric_utils::WasNonBrowserUIDisplayed())
@@ -1758,13 +1758,14 @@ void RecordBrowserStartupTime() {
const base::Time* process_creation_time =
base::CurrentProcessInfo::CreationTime();
- if (process_creation_time)
+ if (!is_first_run && process_creation_time) {
RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime",
base::Time::Now() - *process_creation_time);
+ }
#endif // defined(OS_MACOSX) || defined(OS_WIN)
// Record collected startup metrics.
- startup_metric_utils::OnBrowserStartupComplete();
+ startup_metric_utils::OnBrowserStartupComplete(is_first_run);
// Deletes self.
new LoadCompleteListener();
« no previous file with comments | « chrome/browser/chrome_browser_main.h ('k') | chrome/browser/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698