| Index: chrome/browser/ui/webui/ntp/app_launcher_handler.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
|
| index c90bc0a3d67aa5f31cab2b82fdcc0a58961d41e7..9b11ca98bf5ad849010f8c6949565a423ebea529 100644
|
| --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
|
| +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
|
| @@ -765,16 +765,22 @@ void AppLauncherHandler::OnFaviconForApp(FaviconService::Handle handle,
|
|
|
| WebApplicationInfo::IconInfo icon;
|
| web_app->icons.push_back(icon);
|
| - if (data.is_valid() && gfx::PNGCodec::Decode(data.image_data->front(),
|
| - data.image_data->size(),
|
| - &(web_app->icons[0].data))) {
|
| - web_app->icons[0].url = GURL();
|
| - web_app->icons[0].width = web_app->icons[0].data.width();
|
| - web_app->icons[0].height = web_app->icons[0].data.height();
|
| - } else {
|
| - web_app->icons.clear();
|
| + bool bitmap_data_valid = false;
|
| + if (data.is_valid()) {
|
| + const history::FaviconDataElement& element = data.elements[0];
|
| + if (gfx::PNGCodec::Decode(element.bitmap_data->front(),
|
| + element.bitmap_data->size(),
|
| + &(web_app->icons[0].data))) {
|
| + bitmap_data_valid = true;
|
| + web_app->icons[0].url = GURL();
|
| + web_app->icons[0].width = web_app->icons[0].data.width();
|
| + web_app->icons[0].height = web_app->icons[0].data.height();
|
| + }
|
| }
|
|
|
| + if (!bitmap_data_valid)
|
| + web_app->icons.clear();
|
| +
|
| scoped_refptr<CrxInstaller> installer(
|
| CrxInstaller::Create(extension_service_, NULL));
|
| installer->set_page_ordinal(install_info->page_ordinal);
|
|
|