diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 13:14:46 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-07 13:14:46 +0000 |
commit | d2a39f03962171a148a00f0b9a21c605e7387966 (patch) | |
tree | 97890ba2c830847d7752c4f642204a4e7ec5db93 /chrome/browser/chrome_browser_main.cc | |
parent | 4a7983ee4b4d5e4d0a9c04de358b21967216dc8c (diff) | |
download | chromium_src-d2a39f03962171a148a00f0b9a21c605e7387966.zip chromium_src-d2a39f03962171a148a00f0b9a21c605e7387966.tar.gz chromium_src-d2a39f03962171a148a00f0b9a21c605e7387966.tar.bz2 |
Record first run startup metrics.
Also fixing first run code to only call startup_metric_utils::SetNonBrowserUIDisplayed() if the dialog is actually displayed (which it isn't in many situations).
NOTRY=True (patchset 6 already passed all the try bots, simply updating a string in patchset 7)
BUG=237933, 219419
Review URL: https://chromiumcodereview.appspot.com/14946003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198707 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_browser_main.cc')
-rw-r--r-- | chrome/browser/chrome_browser_main.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 45814a5..829d730 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(); |