| Index: chrome/browser/extensions/extension_icon_manager.cc
|
| diff --git a/chrome/browser/extensions/extension_icon_manager.cc b/chrome/browser/extensions/extension_icon_manager.cc
|
| index 298ab224b0b492a275ccf62033f9a202dea999b3..e245a7f766eb40d26e9dc9a2e3250fda9b80e93b 100644
|
| --- a/chrome/browser/extensions/extension_icon_manager.cc
|
| +++ b/chrome/browser/extensions/extension_icon_manager.cc
|
| @@ -15,6 +15,7 @@
|
| #include "ui/gfx/canvas_skia.h"
|
| #include "ui/gfx/color_utils.h"
|
| #include "ui/gfx/favicon_size.h"
|
| +#include "ui/gfx/image/image.h"
|
| #include "ui/gfx/size.h"
|
| #include "ui/gfx/skbitmap_operations.h"
|
|
|
| @@ -79,21 +80,19 @@ void ExtensionIconManager::RemoveIcon(const std::string& extension_id) {
|
| pending_icons_.erase(extension_id);
|
| }
|
|
|
| -void ExtensionIconManager::OnImageLoaded(SkBitmap* image,
|
| - const ExtensionResource& resource,
|
| +void ExtensionIconManager::OnImageLoaded(const gfx::Image& image,
|
| + const std::string& extension_id,
|
| int index) {
|
| - if (!image)
|
| + if (image.IsEmpty())
|
| return;
|
|
|
| - const std::string extension_id = resource.extension_id();
|
| -
|
| // We may have removed the icon while waiting for it to load. In that case,
|
| // do nothing.
|
| if (!ContainsKey(pending_icons_, extension_id))
|
| return;
|
|
|
| pending_icons_.erase(extension_id);
|
| - icons_[extension_id] = ApplyTransforms(*image);
|
| + icons_[extension_id] = ApplyTransforms(*image.ToSkBitmap());
|
| }
|
|
|
| void ExtensionIconManager::EnsureDefaultIcon() {
|
|
|