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

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: 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 945a9645acdd4855e7534dbe4fc7006adff272eb..fc3d295d7f60903299d6e9f4a1038e7f8a07f4bc 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;
@@ -165,6 +166,13 @@ public class WebappActivity extends FullScreenActivity {
public void postInflationStartup() {
initializeSplashScreen();
+ // Kick off the old web app cleanup (if we haven't alread) now that we have queued the
gone 2015/09/24 10:27:11 nit: alread? I'd move this further down in the pi
Lalit Maganti 2015/09/24 12:35:44 Moved to onResume as this point, UI work should ha
+ // current web app's storage to be opened.
+ if (!mOldWebappCleanupStarted) {
+ WebappRegistry.unregisterOldWebapps(this);
+ mOldWebappCleanupStarted = true;
+ }
+
super.postInflationStartup();
WebappControlContainer controlContainer =
(WebappControlContainer) findViewById(R.id.control_container);

Powered by Google App Engine
This is Rietveld 408576698