Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4333)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/metrics/WebApkUma.java

Issue 2930553002: Add UMA metric to track the time elapsed since a WebAPK was last launched (Closed)
Patch Set: Merge branch 'master' into last_launched2 Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698