Index: chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java b/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java |
index 75850a2dea08197f32fb3ff39028d4650d668da5..4a3a0423b0a2394e2684a2e24aa4afd66c88c72d 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java |
@@ -132,4 +132,13 @@ public class WebApkUma { |
: "WebApk.ShellApkVersion.UnboundApk"; |
RecordHistogram.recordSparseSlowlyHistogram(name, shellApkVersion); |
} |
+ |
+ /** |
+ * Recorded when a WebAPK is launched from the homescreen. Records the time elapsed since the |
+ * previous WebAPK launch. Not recorded the first time that a WebAPK is launched. |
+ */ |
+ public static void recordLaunchInterval(long intervalMs) { |
+ RecordHistogram.recordCustomTimesHistogram("WebApk.LaunchInterval", intervalMs, |
+ TimeUnit.HOURS.toMillis(1), TimeUnit.DAYS.toMillis(30), TimeUnit.MILLISECONDS, 50); |
+ } |
} |