diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/common/extensions/extension.cc | 5 | ||||
-rw-r--r-- | chrome/common/extensions/extension_constants.cc | 2 | ||||
-rw-r--r-- | chrome/common/extensions/extension_constants.h | 1 | ||||
-rw-r--r-- | chrome/common/extensions/extension_unittest.cc | 6 |
4 files changed, 1 insertions, 13 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 2566d41..cd2a8c7 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -947,11 +947,6 @@ 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)) { diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc index d72fbcf..0ae5ff5 100644 --- a/chrome/common/extensions/extension_constants.cc +++ b/chrome/common/extensions/extension_constants.cc @@ -100,8 +100,6 @@ const char* kInvalidPageActionTypeValue = "Invalid value for 'page_actions[*].type', expected 'tab' or 'permanent'."; const char* kInvalidPermissions = "Required value 'permissions' is missing or invalid."; -const char* kInvalidPermissionCountWarning = - "Warning, 'permissions' key found, but array is empty."; const char* kInvalidPermission = "Invalid value for 'permissions[*]'."; const char* kInvalidPermissionScheme = diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h index 09429a2..399315e8 100644 --- a/chrome/common/extensions/extension_constants.h +++ b/chrome/common/extensions/extension_constants.h @@ -87,7 +87,6 @@ namespace extension_manifest_errors { extern const char* kInvalidPageActionId; extern const char* kInvalidPageActionTypeValue; extern const char* kInvalidPermissions; - extern const char* kInvalidPermissionCountWarning; extern const char* kInvalidPermission; extern const char* kInvalidPermissionScheme; extern const char* kInvalidZipHash; diff --git a/chrome/common/extensions/extension_unittest.cc b/chrome/common/extensions/extension_unittest.cc index fb40330..564ef0c 100644 --- a/chrome/common/extensions/extension_unittest.cc +++ b/chrome/common/extensions/extension_unittest.cc @@ -182,11 +182,7 @@ TEST(ExtensionTest, InitFromValueInvalid) { permissions = new ListValue; input_value->Set(keys::kPermissions, permissions); EXPECT_TRUE(extension.InitFromValue(*input_value, true, &error)); - const std::vector<std::string>* error_vector = - ExtensionErrorReporter::GetInstance()->GetErrors(); - const std::string log_error = error_vector->at(error_vector->size() - 1); - EXPECT_TRUE(MatchPattern(log_error, - errors::kInvalidPermissionCountWarning)); + EXPECT_EQ(0u, ExtensionErrorReporter::GetInstance()->GetErrors()->size()); input_value->Set(keys::kPermissions, Value::CreateIntegerValue(9)); EXPECT_FALSE(extension.InitFromValue(*input_value, true, &error)); |