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

Unified Diff: trunk/src/chrome/browser/extensions/bookmark_app_helper.cc

Issue 313633003: Revert 274549 "Add generateAppForLink function in chrome.management" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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
Index: trunk/src/chrome/browser/extensions/bookmark_app_helper.cc
===================================================================
--- trunk/src/chrome/browser/extensions/bookmark_app_helper.cc (revision 274555)
+++ trunk/src/chrome/browser/extensions/bookmark_app_helper.cc (working copy)
@@ -183,9 +183,6 @@
crx_installer_->set_error_on_unsupported_requirements(true);
- if (!contents)
- return;
-
// Add urls from the WebApplicationInfo.
std::vector<GURL> web_app_info_icon_urls;
for (std::vector<WebApplicationInfo::IconInfo>::const_iterator it =
@@ -207,11 +204,7 @@
void BookmarkAppHelper::Create(const CreateBookmarkAppCallback& callback) {
callback_ = callback;
-
- if (favicon_downloader_.get())
- favicon_downloader_->Start();
- else
- OnIconsDownloaded(true, std::map<GURL, std::vector<SkBitmap> >());
+ favicon_downloader_->Start();
}
void BookmarkAppHelper::OnIconsDownloaded(
@@ -246,18 +239,6 @@
}
}
- // Add all existing icons from WebApplicationInfo.
- for (std::vector<WebApplicationInfo::IconInfo>::const_iterator it =
- web_app_info_.icons.begin();
- it != web_app_info_.icons.end();
- ++it) {
- const SkBitmap& icon = it->data;
- if (!icon.drawsNothing() && icon.width() == icon.height())
- downloaded_icons.push_back(icon);
- }
-
- web_app_info_.icons.clear();
-
// If there are icons that don't match the accepted icon sizes, find the
// closest bigger icon to the accepted sizes and resize the icon to it. An
// icon will be resized and used for at most one size.

Powered by Google App Engine
This is Rietveld 408576698