| Index: chrome/browser/chrome_browser_main.cc
|
| diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
| index 017948bdead72be4f23b7fd4fa564755693945e4..82006f50ad8cd2e89f6b17acdb9c55dee5d1fb41 100644
|
| --- a/chrome/browser/chrome_browser_main.cc
|
| +++ b/chrome/browser/chrome_browser_main.cc
|
| @@ -17,6 +17,7 @@
|
| #include "base/metrics/field_trial.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/path_service.h"
|
| +#include "base/process_info.h"
|
| #include "base/process_util.h"
|
| #include "base/string_number_conversions.h"
|
| #include "base/string_piece.h"
|
| @@ -2002,6 +2003,19 @@ void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
|
|
|
| // Misc ------------------------------------------------------------------------
|
|
|
| +void RecordBrowserStartupTime() {
|
| +// CurrentProcessInfo::CreationTime() is currently only implemented on Mac and
|
| +// Windows.
|
| +#if defined(OS_MACOSX) || defined(OS_WIN)
|
| + const base::Time *process_creation_time =
|
| + base::CurrentProcessInfo::CreationTime();
|
| +
|
| + if (!process_creation_time->is_null())
|
| + RecordPreReadExperimentTime("Startup.BrowserMessageLoopStartTime",
|
| + base::Time::Now() - *process_creation_time);
|
| +#endif // OS_MACOSX || OS_WIN
|
| +}
|
| +
|
| // This code is specific to the Windows-only PreReadExperiment field-trial.
|
| void RecordPreReadExperimentTime(const char* name, base::TimeDelta time) {
|
| DCHECK(name != NULL);
|
|
|