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

Unified Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.cc

Issue 7600010: Fix JS to pass through drop data from bookmark bar. Don't put (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Revert crx_installer Created 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f6c55fb95e4e4c65009306c8d4f0704642c50dd7..4f8f26dd4764c4200ea8262ad04e974e1d54bc90 100644
--- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
+++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc
@@ -701,10 +701,6 @@ void AppLauncherHandler::HandleGenerateAppForLink(const ListValue* args) {
web_app->is_bookmark_app = true;
web_app->title = title;
web_app->app_url = launch_url;
- WebApplicationInfo::IconInfo icon;
- icon.url = GURL();
- icon.width = icon.height = 16;
- web_app->icons.push_back(icon);
Profile* profile = web_ui_->GetProfile();
FaviconService* favicon_service =
@@ -741,13 +737,16 @@ void AppLauncherHandler::OnFaviconForApp(FaviconService::Handle handle,
history::FaviconData data) {
scoped_ptr<WebApplicationInfo> web_app(
favicon_consumer_.GetClientDataForCurrentRequest());
- CHECK(!web_app->icons.empty());
+ 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();
}
scoped_refptr<CrxInstaller> installer(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698