Chromium Code Reviews| 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, |