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

Unified Diff: chrome/common/extensions/api/extension_action/action_info.cc

Issue 508783002: Update old syntax for action default_icon to populate 19 and 38px icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated unit test Created 6 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 | chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_action/action_info.cc
diff --git a/chrome/common/extensions/api/extension_action/action_info.cc b/chrome/common/extensions/api/extension_action/action_info.cc
index 1068dacea09291cc48ce71871b9d0f06a7e53e22..95fea8f54d9fee7b2fd3e1451b6da3ba033d1070 100644
--- a/chrome/common/extensions/api/extension_action/action_info.cc
+++ b/chrome/common/extensions/api/extension_action/action_info.cc
@@ -105,7 +105,11 @@ scoped_ptr<ActionInfo> ActionInfo::Load(const Extension* extension,
} else if (dict->GetString(keys::kPageActionDefaultIcon, &default_icon) &&
manifest_handler_helpers::NormalizeAndValidatePath(
&default_icon)) {
- result->default_icon.Add(extension_misc::EXTENSION_ICON_ACTION,
+ // Choose the most optimistic (highest) icon density - e.g. 38 not 19 -
+ // regardless of the actual icon resolution, whatever that happens to be.
+ // Code elsewhere knows how to scale 38 down to 19.
+ result->default_icon.Add(extension_misc::EXTENSION_ICON_ACTION *
+ extension_misc::kNumExtensionActionIconSizes,
default_icon);
} else {
*error = base::ASCIIToUTF16(errors::kInvalidPageActionIconPath);
« no previous file with comments | « no previous file | chrome/common/extensions/api/extension_action/browser_action_manifest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698