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 e8612a18a4d7a25953c8afaf9187d781462b4dd1..e4069c86ccc2c4284d7887b5c0e4de12adb9c44e 100644 |
| --- a/chrome/browser/chrome_browser_main.cc |
| +++ b/chrome/browser/chrome_browser_main.cc |
| @@ -686,7 +686,15 @@ void ChromeBrowserMainParts::RecordBrowserStartupTime() { |
| if (startup_metric_utils::WasNonBrowserUIDisplayed()) |
| return; |
| +#if !defined(OS_ANDROID) |
|
jam
2013/08/29 15:16:17
ditto
aberent
2013/08/29 16:19:44
Done.
|
| bool is_first_run = first_run::IsChromeFirstRun(); |
| +#else |
| + // On Android the first run is handled very differently, and the C++ side of |
| + // Chrome doesn't know if this is the first run. This will cause some |
| + // inaccuracy in the UMA statistics, but this should be minor (first runs are |
| + // rare). |
| + bool is_first_run = false; |
| +#endif |
| // CurrentProcessInfo::CreationTime() is currently only implemented on some |
| // platforms. |
| @@ -1595,7 +1603,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
| delete parameters().ui_task; |
| run_message_loop_ = false; |
| } |
| - |
| +#if defined(OS_ANDROID) |
| + // We never run the C++ main loop on Android, since the UI thread message |
| + // loop is controlled by the OS, so this is as close as we can get to |
| + // the start of the main loop |
| + if (result_code_ <= 0) { |
| + RecordBrowserStartupTime(); |
| + } |
| +#endif |
| return result_code_; |
| } |