diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 01:15:05 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-18 01:15:05 +0000 |
commit | eb4035b0048a7c9e3eeae7e189161f0cfbf3db22 (patch) | |
tree | f4983eda31d8c336e73cad63f8ba28a11d8f49da /chrome | |
parent | 7e8e3dd7b1633874650f8de9a818aca8cb594f5b (diff) | |
download | chromium_src-eb4035b0048a7c9e3eeae7e189161f0cfbf3db22.zip chromium_src-eb4035b0048a7c9e3eeae7e189161f0cfbf3db22.tar.gz chromium_src-eb4035b0048a7c9e3eeae7e189161f0cfbf3db22.tar.bz2 |
Revert 26534: "Fix bug where we fail to install an extension
that has an empty"
TBR=rafaelw@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26538 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/extensions/extension.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index cd2a8c7..2566d41 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -947,6 +947,11 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_id, return false; } + if (permissions->GetSize() == 0) { + ExtensionErrorReporter::GetInstance()->ReportError( + errors::kInvalidPermissionCountWarning, false); + } + for (size_t i = 0; i < permissions->GetSize(); ++i) { std::string permission_str; if (!permissions->GetString(i, &permission_str)) { |