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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.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_launched 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/WebappActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
index 5ca863096b36d819eac0d67cdd363465992cb0c1..7d2c2d4404894bb08b2c8375a55cbba09b951769 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
@@ -405,10 +405,15 @@ public class WebappActivity extends FullScreenActivity {
// app is not directly launched from the home screen, as this interferes
// with the heuristic.
if (mWebappInfo.isLaunchedFromHomescreen()) {
+ onWillUpdateLastUsedTime(storage);
dominickn 2017/06/08 05:15:27 It would be good if you could add a quick test tha
pkotwicz 2017/06/12 20:34:46 How do you suggest that I add such a test? I don't
dominickn 2017/06/14 00:19:39 Ah yes, the integration test is sufficient with an
+ storage.setWasLaunched();
dominickn 2017/06/08 05:15:27 I think you need to setWasLaunched() before onWill
pkotwicz 2017/06/12 20:34:46 Actually, it is important for the WebApkActivity m
storage.updateLastUsedTime();
}
}
+ /** Called prior to updating the "last used" time in WebappDataStorage. */
+ protected void onWillUpdateLastUsedTime(WebappDataStorage storage) {}
+
protected void initializeSplashScreenWidgets(int backgroundColor, Bitmap splashImage) {
Bitmap displayIcon = splashImage == null ? mWebappInfo.icon() : splashImage;
int minimiumSizeThreshold = getResources().getDimensionPixelSize(

Powered by Google App Engine
This is Rietveld 408576698