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

Unified Diff: chrome/browser/ui/webui/extension_icon_source.cc

Issue 7452008: Improve layout for bookmark-apps. Add a treatment for small icons. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: More rebase repair Created 9 years, 5 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: chrome/browser/ui/webui/extension_icon_source.cc
diff --git a/chrome/browser/ui/webui/extension_icon_source.cc b/chrome/browser/ui/webui/extension_icon_source.cc
index 78c7b27b8f8889f3e86cccd4b6de25549d54f9bf..e8710987041f49d8455136750d4b93e2bf5caeb3 100644
--- a/chrome/browser/ui/webui/extension_icon_source.cc
+++ b/chrome/browser/ui/webui/extension_icon_source.cc
@@ -75,9 +75,19 @@ ExtensionIconSource::~ExtensionIconSource() {
GURL ExtensionIconSource::GetIconURL(const Extension* extension,
Extension::Icons icon_size,
ExtensionIconSet::MatchType match,
- bool grayscale) {
- if (extension->id() == extension_misc::kWebStoreAppId)
+ bool grayscale,
+ bool* exists) {
Evan Stade 2011/07/27 16:31:45 nit: set exists to true at the start of the functi
Greg Billock 2011/07/27 19:52:24 Done.
+ if (extension->id() == extension_misc::kWebStoreAppId) {
+ if (exists) *exists = true;
return GURL("chrome://theme/IDR_WEBSTORE_ICON");
+ }
+
+ if (exists) {
+ if (extension->GetIconURL(icon_size, match) == GURL())
+ *exists = false;
+ else
+ *exists = true;
+ }
GURL icon_url(base::StringPrintf("%s%s/%d/%d%s",
chrome::kChromeUIExtensionIconURL,

Powered by Google App Engine
This is Rietveld 408576698