Chromium Code Reviews| 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..a73f88fe92489862a7b4998f1c1a49a3e9e738e9 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,17 @@ 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) { |
| + // TODO(mgiuca): Do we want to do this? DO NOT SUBMIT. |
| + // it->EnsureRepsForSupportedScaleFactors(); |
| + const SkBitmap& bitmap = *it->bitmap(); |
| + NSBitmapImageRep* image_rep = SkBitmapToImageRep(bitmap); |
|
pkotwicz
2013/03/20 22:19:52
There is one case where |favicon| can have an Imag
|
| if (!image_rep) |
| continue; |