Index: chrome/android/java/src/org/chromium/chrome/browser/UmaUtils.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/UmaUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/UmaUtils.java |
index deb568ae5cfc44657157139db258fdffd929ec8e..ff2e9d5c4fe5955b3709824c26a6a667705a356e 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/UmaUtils.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/UmaUtils.java |
@@ -13,6 +13,8 @@ public class UmaUtils { |
private static long sApplicationStartWallClockMs; |
+ private static boolean sRunningApplicationStart; |
+ |
/** |
* Record the time at which the activity started. This should be called asap after |
* the start of the activity's onCreate function. |
@@ -25,6 +27,25 @@ public class UmaUtils { |
sApplicationStartWallClockMs = System.currentTimeMillis(); |
} |
+ /** |
+ * 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 |
+ * recorded. Currently, the very first navigation commit in the lifetime of the process ends the |
+ * "application start". |
+ * Must only be called on the UI thread. |
+ */ |
+ public static boolean isRunningApplicationStart() { |
+ return sRunningApplicationStart; |
+ } |
+ |
+ /** |
+ * Marks/unmarks the "application start" stage of the browser process lifetime. |
+ * Must only be called on the UI thread. |
+ */ |
+ public static void setRunningApplicationStart(boolean isAppStart) { |
+ sRunningApplicationStart = isAppStart; |
+ } |
+ |
@CalledByNative |
private static long getMainEntryPointTime() { |
return sApplicationStartWallClockMs; |