Chromium Code Reviews| Index: chrome/browser/chrome_browser_main.cc |
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc |
| index f89afc83cb5b365829edbb7613de8520c6c3bb29..33869cd6cdacc77d67b20c33f2686224d1849682 100644 |
| --- a/chrome/browser/chrome_browser_main.cc |
| +++ b/chrome/browser/chrome_browser_main.cc |
| @@ -1623,7 +1623,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); |
| @@ -1744,7 +1744,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()) |
| @@ -1756,13 +1756,16 @@ void RecordBrowserStartupTime() { |
| const base::Time* process_creation_time = |
| base::CurrentProcessInfo::CreationTime(); |
| - if (process_creation_time) |
| - RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime", |
| + if (process_creation_time) { |
| + RecordPreReadExperimentTime( |
| + is_first_run ? "Startup.FirstRun.BrowserMessageLoopStartTime" : |
| + "Startup.BrowserMessageLoopStartTime", |
|
jeremy
2013/05/05 12:35:56
I don't think you need to add a new histogram here
gab
2013/05/06 16:19:54
Ok, let's not record this one on first run though
|
| 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(); |