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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java

Issue 1359383002: webapps: Add cleanup task when opening up WebappActivity to clean old web apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webapp-cleanup
Patch Set: Address review comments Created 5 years, 3 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 f34f440c6453cc952ab2ea360bb3b90afd4ecc2c..5803d30cc7c320707a3d5ae69b8ed335c1959eee 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
@@ -52,6 +52,7 @@ public class WebappActivity extends FullScreenActivity {
private final WebappInfo mWebappInfo;
private AsyncTask<WebappActivity, Void, Void> mCleanupTask;
+ private boolean mOldWebappCleanupStarted;
private WebContentsObserver mWebContentsObserver;
@@ -156,6 +157,13 @@ public class WebappActivity extends FullScreenActivity {
updateTaskDescription();
}
super.onResume();
+
+ // Kick off the old web app cleanup (if we haven't alread) now that we have queued the
+ // current web app's storage to be opened.
+ if (!mOldWebappCleanupStarted) {
+ WebappRegistry.unregisterOldWebapps(this, System.currentTimeMillis());
+ mOldWebappCleanupStarted = true;
+ }
}
@Override

Powered by Google App Engine
This is Rietveld 408576698