From 6e8e7d1c49657e82d0e8f2518ad463794346321b Mon Sep 17 00:00:00 2001 From: estade Date: Fri, 18 Dec 2015 18:39:37 -0800 Subject: Change extension icon load errors to warnings During the Extension parsing step, check if the icon file exists and if not, remove that entry from the dictionary. Keep the same check during the validation phase and don't apply the workaround to unpacked extensions. This will more strongly discourage new extensions from making this mistake. BUG=570249 Review URL: https://codereview.chromium.org/1537473003 Cr-Commit-Position: refs/heads/master@{#366253} --- extensions/utility/unpacker.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'extensions/utility') diff --git a/extensions/utility/unpacker.cc b/extensions/utility/unpacker.cc index 36c0eba..4763268 100644 --- a/extensions/utility/unpacker.cc +++ b/extensions/utility/unpacker.cc @@ -185,9 +185,8 @@ bool Unpacker::Run() { // Decode any images that the browser needs to display. std::set image_paths = ExtensionsClient::Get()->GetBrowserImagePaths(extension.get()); - for (std::set::iterator it = image_paths.begin(); - it != image_paths.end(); ++it) { - if (!AddDecodedImage(*it)) + for (const base::FilePath& path : image_paths) { + if (!AddDecodedImage(path)) return false; // Error was already reported. } -- cgit v1.1