summaryrefslogtreecommitdiffstats
path: root/extensions/common/manifest_handler_helpers.cc
diff options
context:
space:
mode:
authorestade <estade@chromium.org>2016-01-05 14:14:32 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-05 22:16:20 +0000
commit612db46613451f3c0d2ab5a3b0be373f6550d968 (patch)
tree3c3df137187698332ca1c2e1f02e490be928de54 /extensions/common/manifest_handler_helpers.cc
parentd71ea5987a457e8d08b9d722c3022d47c965159f (diff)
downloadchromium_src-612db46613451f3c0d2ab5a3b0be373f6550d968.zip
chromium_src-612db46613451f3c0d2ab5a3b0be373f6550d968.tar.gz
chromium_src-612db46613451f3c0d2ab5a3b0be373f6550d968.tar.bz2
Manual revert of "Change extension icon load errors to warnings"
This salvages a couple minor changes (tests, mostly), but is largely a revert of 6e8e7d1c49657e82d0e8f25 BUG=570249 Review URL: https://codereview.chromium.org/1552323002 Cr-Commit-Position: refs/heads/master@{#367667}
Diffstat (limited to 'extensions/common/manifest_handler_helpers.cc')
-rw-r--r--extensions/common/manifest_handler_helpers.cc24
1 files changed, 2 insertions, 22 deletions
diff --git a/extensions/common/manifest_handler_helpers.cc b/extensions/common/manifest_handler_helpers.cc
index 36af224d..bfc9e33 100644
--- a/extensions/common/manifest_handler_helpers.cc
+++ b/extensions/common/manifest_handler_helpers.cc
@@ -13,10 +13,7 @@
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_icon_set.h"
-#include "extensions/common/file_util.h"
#include "extensions/common/manifest_constants.h"
-#include "grit/extensions_strings.h"
-#include "ui/base/l10n/l10n_util.h"
namespace extensions {
@@ -35,8 +32,7 @@ bool NormalizeAndValidatePath(std::string* path) {
return true;
}
-bool LoadIconsFromDictionary(Extension* extension,
- const base::DictionaryValue* icons_value,
+bool LoadIconsFromDictionary(const base::DictionaryValue* icons_value,
ExtensionIconSet* icons,
base::string16* error) {
DCHECK(icons);
@@ -53,23 +49,7 @@ bool LoadIconsFromDictionary(Extension* extension,
return false;
}
- // For backwards compatibility, only warn (don't error out) if an icon is
- // missing. Component extensions can skip this check as their icons are not
- // located on disk. Unpacked extensions skip this check and fail later
- // during validation if the file isn't present. See crbug.com/570249
- // TODO(estade|devlin): remove this workaround and let install fail in the
- // validate step a few releases after M49. See http://crbug.com/571193
- if (Manifest::IsComponentLocation(extension->location()) ||
- Manifest::IsUnpackedLocation(extension->location()) ||
- file_util::ValidateFilePath(
- extension->GetResource(icon_path).GetFilePath())) {
- icons->Add(size, icon_path);
- } else {
- extension->AddInstallWarning(InstallWarning(
- l10n_util::GetStringFUTF8(IDS_EXTENSION_LOAD_ICON_FAILED,
- base::UTF8ToUTF16(icon_path)),
- std::string()));
- }
+ icons->Add(size, icon_path);
}
return true;
}