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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.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/webapps/WebApkActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
index c4d55b511995c8125fbede9e250d66319866d5ca..8ac103a43a77fdce6e7c04aecc4f4b3426ebc0d1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebApkActivity.java
@@ -182,6 +182,14 @@ public class WebApkActivity extends WebappActivity {
maybeShowDisclosure(storage);
}
+ @Override
+ protected void onUpdatedLastUsedTime(
+ WebappDataStorage storage, boolean previouslyLaunched, long previousUsageTimestamp) {
+ if (previouslyLaunched) {
+ WebApkUma.recordLaunchInterval(storage.getLastUsedTime() - previousUsageTimestamp);
+ }
+ }
+
/**
* If we're showing a WebApk that's not with an expected package, it must be an
* "Unbound WebApk" (crbug.com/714735) so show a notification that it's running in Chrome.

Powered by Google App Engine
This is Rietveld 408576698