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

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

Issue 1286973003: webapps: introduce helper class to store extended set of data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix minor issue Created 5 years, 4 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/WebappInfo.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
index 5a8880630ac0d67af762cbaa2a11c05bb48b9577..8befb21e498bfc134e51389290cec5af65f4e691 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java
@@ -6,10 +6,7 @@ package org.chromium.chrome.browser.webapps;
import android.content.Intent;
import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
import android.net.Uri;
-import android.text.TextUtils;
-import android.util.Base64;
import android.util.Log;
import org.chromium.chrome.browser.ShortcutHelper;
@@ -197,10 +194,7 @@ public class WebappInfo {
*/
public Bitmap icon() {
if (mDecodedIcon != null) return mDecodedIcon;
- if (TextUtils.isEmpty(mEncodedIcon)) return null;
-
- byte[] decoded = Base64.decode(mEncodedIcon, Base64.DEFAULT);
- mDecodedIcon = BitmapFactory.decodeByteArray(decoded, 0, decoded.length);
+ mDecodedIcon = ShortcutHelper.decodeBitmapFromString(mEncodedIcon);
return mDecodedIcon;
}

Powered by Google App Engine
This is Rietveld 408576698