| Index: chrome/common/extensions/extension.cc
|
| diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
|
| index 4f3aaf7c94cda355d97901b7c8153717b59e785c..30d3290815a1b1634e0a691e202581788021605f 100644
|
| --- a/chrome/common/extensions/extension.cc
|
| +++ b/chrome/common/extensions/extension.cc
|
| @@ -1421,8 +1421,8 @@ bool Extension::LoadIcons(string16* error) {
|
| return false;
|
| }
|
|
|
| - for (size_t i = 0; i < ExtensionIconSet::kNumIconSizes; ++i) {
|
| - std::string key = base::IntToString(ExtensionIconSet::kIconSizes[i]);
|
| + for (size_t i = 0; i < icons_.num_allowed_sizes(); ++i) {
|
| + std::string key = base::IntToString(icons_.allowed_sizes()[i]);
|
| if (icons_value->HasKey(key)) {
|
| std::string icon_path;
|
| if (!icons_value->GetString(key, &icon_path)) {
|
| @@ -1439,7 +1439,7 @@ bool Extension::LoadIcons(string16* error) {
|
| errors::kInvalidIconPath, key);
|
| return false;
|
| }
|
| - icons_.Add(ExtensionIconSet::kIconSizes[i], icon_path);
|
| + icons_.Add(icons_.allowed_sizes()[i], icon_path);
|
| }
|
| }
|
| return true;
|
| @@ -2897,6 +2897,7 @@ Extension::Extension(const FilePath& path,
|
| : manifest_version_(0),
|
| incognito_split_mode_(false),
|
| offline_enabled_(false),
|
| + icons_(ExtensionIconSet::ICON_SET_MANIFEST_ICONS),
|
| converted_from_user_script_(false),
|
| background_page_is_persistent_(true),
|
| allow_background_js_access_(true),
|
| @@ -3014,25 +3015,25 @@ bool Extension::FormatPEMForFileOutput(const std::string& input,
|
|
|
| // static
|
| void Extension::DecodeIcon(const Extension* extension,
|
| - ExtensionIconSet::Icons preferred_icon_size,
|
| + int preferred_icon_size,
|
| ExtensionIconSet::MatchType match_type,
|
| scoped_ptr<SkBitmap>* result) {
|
| std::string path = extension->icons().Get(preferred_icon_size, match_type);
|
| - ExtensionIconSet::Icons size = extension->icons().GetIconSizeFromPath(path);
|
| + int size = extension->icons().GetIconSizeFromPath(path);
|
| ExtensionResource icon_resource = extension->GetResource(path);
|
| DecodeIconFromPath(icon_resource.GetFilePath(), size, result);
|
| }
|
|
|
| // static
|
| void Extension::DecodeIcon(const Extension* extension,
|
| - ExtensionIconSet::Icons icon_size,
|
| + int icon_size,
|
| scoped_ptr<SkBitmap>* result) {
|
| DecodeIcon(extension, icon_size, ExtensionIconSet::MATCH_EXACTLY, result);
|
| }
|
|
|
| // static
|
| void Extension::DecodeIconFromPath(const FilePath& icon_path,
|
| - ExtensionIconSet::Icons icon_size,
|
| + int icon_size,
|
| scoped_ptr<SkBitmap>* result) {
|
| if (icon_path.empty())
|
| return;
|
|
|