| Index: chrome/browser/web_applications/web_app_mac.mm
|
| diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
|
| index 2c6154800a6a4b4f57b95639328c727be7316053..0ae9f769e12fa77ef516e1897ba0f9629678bfce 100644
|
| --- a/chrome/browser/web_applications/web_app_mac.mm
|
| +++ b/chrome/browser/web_applications/web_app_mac.mm
|
| @@ -24,6 +24,7 @@
|
| #include "skia/ext/skia_utils_mac.h"
|
| #include "third_party/icon_family/IconFamily.h"
|
| #include "ui/base/l10n/l10n_util_mac.h"
|
| +#include "ui/gfx/icon_family.h"
|
| #include "ui/gfx/image/image_skia.h"
|
|
|
| namespace {
|
| @@ -197,17 +198,18 @@ bool WebAppShortcutCreator::UpdatePlist(const base::FilePath& app_path) const {
|
| }
|
|
|
| bool WebAppShortcutCreator::UpdateIcon(const base::FilePath& app_path) const {
|
| - if (info_.favicon.IsEmpty())
|
| + if (info_.favicon.empty())
|
| return true;
|
|
|
| scoped_nsobject<IconFamily> icon_family([[IconFamily alloc] init]);
|
| bool image_added = false;
|
| - info_.favicon.ToImageSkia()->EnsureRepsForSupportedScaleFactors();
|
| - std::vector<gfx::ImageSkiaRep> image_reps =
|
| - info_.favicon.ToImageSkia()->image_reps();
|
| - for (size_t i = 0; i < image_reps.size(); ++i) {
|
| - NSBitmapImageRep* image_rep = SkBitmapToImageRep(
|
| - image_reps[i].sk_bitmap());
|
| + for (gfx::IconFamily::const_iterator it = info_.favicon.begin();
|
| + it != info_.favicon.end(); ++it) {
|
| + const gfx::ImageSkia& image_skia = it->second;
|
| + // TODO(mgiuca): Do we want to do this? DO NOT SUBMIT.
|
| + // image_skia.EnsureRepsForSupportedScaleFactors();
|
| + const SkBitmap& bitmap = *image_skia.bitmap();
|
| + NSBitmapImageRep* image_rep = SkBitmapToImageRep(bitmap);
|
| if (!image_rep)
|
| continue;
|
|
|
|
|