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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 14683012: Merge 198707 "Record first run startup metrics." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1500/src/
Patch Set: 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
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 199532)
+++ chrome/browser/chrome_browser_main.cc (working copy)
@@ -1625,7 +1625,7 @@
// 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 @@
// 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 @@
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