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

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 Mounir's 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1912b565e9877cc30608894e1893de9ebd040cd3..16ac612bf453644d3478bbb95033ccd0ac713827 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
@@ -53,6 +53,7 @@ public class WebappActivity extends FullScreenActivity {
private final WebappInfo mWebappInfo;
private AsyncTask<Void, 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 already) now that we have queued the
+ // current web app's storage to be opened.
+ if (!mOldWebappCleanupStarted) {
+ WebappRegistry.unregisterOldWebapps(this, System.currentTimeMillis());
+ mOldWebappCleanupStarted = true;
+ }
}
@Override
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698