| Index: chrome/common/extensions/features/permission_feature.cc
|
| diff --git a/chrome/common/extensions/features/permission_feature.cc b/chrome/common/extensions/features/permission_feature.cc
|
| index 1f5da626995751a25540285db3da55a47a772af0..c4970946895ea69207f211cc552011681d955d33 100644
|
| --- a/chrome/common/extensions/features/permission_feature.cc
|
| +++ b/chrome/common/extensions/features/permission_feature.cc
|
| @@ -36,4 +36,21 @@ Feature::Availability PermissionFeature::IsAvailableToContext(
|
| return CreateAvailability(IS_AVAILABLE);
|
| }
|
|
|
| +bool PermissionFeature::Parse(const DictionaryValue* value) {
|
| + if (!SimpleFeature::Parse(value))
|
| + return false;
|
| +
|
| + if (extension_types()->empty()) {
|
| + LOG(ERROR) << name() << ": Permission features must specify at least one "
|
| + << "value for extension_types.";
|
| + return false;
|
| + }
|
| +
|
| + if (!GetContexts()->empty()) {
|
| + LOG(ERROR) << name() << ": Permission features do not support contexts.";
|
| + return false;
|
| + }
|
| + return true;
|
| +}
|
| +
|
| } // namespace
|
|
|