Chromium Code Reviews| Index: chrome/common/startup_metric_utils.cc |
| diff --git a/chrome/common/startup_metric_utils.cc b/chrome/common/startup_metric_utils.cc |
| index 3d576e9f402820dd0adfe68f4d0f2a5f7da9ce58..5bd196eb890599d45fe617687a8f14f6193896f6 100644 |
| --- a/chrome/common/startup_metric_utils.cc |
| +++ b/chrome/common/startup_metric_utils.cc |
| @@ -19,7 +19,7 @@ namespace { |
| // Note that at the time of this writing, access is only on the UI thread. |
| volatile bool g_non_browser_ui_displayed = false; |
| -const base::Time* MainEntryPointTimeInternal() { |
| +base::Time* MainEntryPointTimeInternal() { |
| static base::Time main_start_time = base::Time::Now(); |
| return &main_start_time; |
| } |
| @@ -59,6 +59,14 @@ void RecordMainEntryPointTime() { |
| MainEntryPointTimeInternal(); |
| } |
| +#if defined(OS_ANDROID) |
| +void RecordSavedMainEntryPointTime(const base::Time& entry_point_time) { |
| + DCHECK(!g_main_entry_time_was_recorded); |
| + g_main_entry_time_was_recorded = true; |
| + *MainEntryPointTimeInternal() = entry_point_time; |
| +} |
| +#endif |
|
jeremy
2013/08/28 18:15:56
#endif // OS_ANDROID
aberent
2013/08/29 11:45:13
Done.
|
| + |
| // Return the time recorded by RecordMainEntryPointTime(). |
| const base::Time MainEntryStartTime() { |
| DCHECK(g_main_entry_time_was_recorded); |