Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java |
| index 37511a3ccab40c6e2f30e3e24c989cb5a3750a48..58e442e020cc1e4061bd245f496ee87965040634 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappDataStorage.java |
| @@ -86,11 +86,21 @@ public class WebappDataStorage { |
| sFactory = factory; |
| } |
| - protected WebappDataStorage(Context context, String webappId) { |
| - mPreferences = context.getApplicationContext().getSharedPreferences( |
| + /** Package private for use by WebappRegistry */ |
| + static void delete(final Context context, final String webappId) { |
|
mlamouri (slow - plz ping)
2015/09/08 10:03:00
Shouldn't you add some method comments?
Lalit Maganti
2015/09/08 10:44:28
I didn't because they are package private. I guess
|
| + assert !ThreadUtils.runningOnUiThread(); |
| + openSharedPreferences(context, webappId).edit().clear().commit(); |
| + } |
| + |
| + private static SharedPreferences openSharedPreferences(Context context, String webappId) { |
| + return context.getApplicationContext().getSharedPreferences( |
| SHARED_PREFS_FILE_PREFIX + webappId, Context.MODE_PRIVATE); |
| } |
| + protected WebappDataStorage(Context context, String webappId) { |
| + mPreferences = openSharedPreferences(context, webappId); |
| + } |
| + |
| /* |
| * Asynchronously retrieves the splash screen image associated with the |
| * current web app. |