Index: chrome/app/android/chrome_main_delegate_android.cc |
diff --git a/chrome/app/android/chrome_main_delegate_android.cc b/chrome/app/android/chrome_main_delegate_android.cc |
index 6b726c6147f63599fa024b026a7a59b86540dd56..2b62047c837bce8a3540d57e3ce34fa9d4035967 100644 |
--- a/chrome/app/android/chrome_main_delegate_android.cc |
+++ b/chrome/app/android/chrome_main_delegate_android.cc |
@@ -8,6 +8,8 @@ |
#include "base/debug/trace_event.h" |
#include "chrome/browser/android/chrome_jni_registrar.h" |
#include "chrome/browser/android/chrome_startup_flags.h" |
+#include "chrome/browser/android/uma_utils.h" |
+#include "chrome/common/startup_metric_utils.h" |
#include "content/public/browser/browser_main_runner.h" |
// ChromeMainDelegateAndroid is created when the library is loaded. It is always |
@@ -33,10 +35,14 @@ int ChromeMainDelegateAndroid::RunProcess( |
RegisterApplicationNativeMethods(env); |
// Because the browser process can be started asynchronously as a series of |
- // of UI thread tasks a second request to start it can come in while the |
- // first request is still being processed. We must keep the same |
+ // UI thread tasks a second request to start it can come in while the |
+ // first request is still being processed. Chrome must keep the same |
// browser runner for the second request. |
+ // Also only record the start time the first time round, since this is the |
+ // start time of the application, and will be same for all requests. |
if (!browser_runner_.get()) { |
+ base::Time startTime = chrome::android::GetMainEntryPointTime(); |
+ startup_metric_utils::RecordSavedMainEntryPointTime(startTime); |
browser_runner_.reset(content::BrowserMainRunner::Create()); |
} |
return browser_runner_->Initialize(main_function_params); |