Index: chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
index b174519765b4af9ef2162054881fadbf36241fd6..9e271e6fdbc34252831fd4bc896b36aa7ea2467f 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java |
@@ -167,7 +167,7 @@ public class ShortcutHelper { |
// Store the webapp data so that it is accessible without the intent. Once this |
// process is complete, call back to native code to start the splash image |
// download. |
- WebappRegistry.registerWebapp( |
+ WebappRegistry.getInstance().register( |
id, new WebappRegistry.FetchWebappDataStorageCallback() { |
@Override |
public void onWebappDataStorageRetrieved(WebappDataStorage storage) { |
@@ -227,7 +227,7 @@ public class ShortcutHelper { |
} |
/** |
- * Creates a storage location and stores the data for a web app using {@link WebappDataStorage}. |
+ * Stores the specified bitmap as the splash screen for a web app. |
* @param id ID of the web app which is storing data. |
* @param splashImage Image which should be displayed on the splash screen of |
* the web app. This can be null of there is no image to show. |
@@ -235,16 +235,8 @@ public class ShortcutHelper { |
@SuppressWarnings("unused") |
@CalledByNative |
private static void storeWebappSplashImage(final String id, final Bitmap splashImage) { |
- WebappRegistry.getWebappDataStorage( |
- id, new WebappRegistry.FetchWebappDataStorageCallback() { |
- @Override |
- public void onWebappDataStorageRetrieved(WebappDataStorage storage) { |
- if (storage == null) return; |
- |
- storage.updateSplashScreenImage(splashImage); |
- } |
- |
- }); |
+ WebappDataStorage storage = WebappRegistry.getInstance().getWebappDataStorage(id); |
+ if (storage != null) storage.updateSplashScreenImage(splashImage); |
} |
/** |