Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java |
| index bdbc1283a74d6fb14be65213c52a895e375d34d3..8b66730899972828baf2f76040bff6ddfb49a315 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaUtils.java |
| @@ -18,6 +18,7 @@ public class UmaUtils { |
| private static long sApplicationStartUptimeMs; |
| private static boolean sRunningApplicationStart; |
| + private static long sForegroundStartTimeMs; |
| /** |
| * Record the time at which the activity started. This should be called asap after |
| @@ -32,6 +33,10 @@ public class UmaUtils { |
| sApplicationStartUptimeMs = SystemClock.uptimeMillis(); |
| } |
| + public static void recordForegroundStartTime() { |
| + sForegroundStartTimeMs = SystemClock.uptimeMillis(); |
| + } |
| + |
| /** |
| * Whether the application is in the early stage since the browser process start. The |
| * "application start" ends right after the last histogram related to browser startup is |
| @@ -69,5 +74,10 @@ public class UmaUtils { |
| return sApplicationStartUptimeMs; |
|
Yaron
2016/07/06 14:27:50
so remove this now?
Peter Wen
2016/07/06 15:21:37
Done.
|
| } |
| + public static long getForegroundStartTime() { |
| + assert sForegroundStartTimeMs != 0; |
| + return sForegroundStartTimeMs; |
| + } |
| + |
| private static native void nativeRecordMetricsReportingDefaultOptIn(boolean optIn); |
| } |