| Index: extensions/common/features/api_feature.cc
|
| diff --git a/extensions/common/features/api_feature.cc b/extensions/common/features/api_feature.cc
|
| index e3e4c91b6db3796a5d548d38b6ef5bd9576fca3e..67882f90d5d051cf35bf787e958e8787c669e68e 100644
|
| --- a/extensions/common/features/api_feature.cc
|
| +++ b/extensions/common/features/api_feature.cc
|
| @@ -6,27 +6,21 @@
|
|
|
| namespace extensions {
|
|
|
| -APIFeature::APIFeature()
|
| - : internal_(false) {}
|
| +APIFeature::APIFeature() {}
|
|
|
| APIFeature::~APIFeature() {
|
| }
|
|
|
| -bool APIFeature::IsInternal() const {
|
| - return internal_;
|
| -}
|
| -
|
| -std::string APIFeature::Parse(const base::DictionaryValue* value) {
|
| - std::string error = SimpleFeature::Parse(value);
|
| - if (!error.empty())
|
| - return error;
|
| -
|
| - value->GetBoolean("internal", &internal_);
|
| +bool APIFeature::Validate(std::string* error) {
|
| + if (!SimpleFeature::Validate(error))
|
| + return false;
|
|
|
| - if (contexts()->empty())
|
| - return name() + ": API features must specify at least one context.";
|
| + if (contexts()->empty()) {
|
| + *error = name() + ": API features must specify at least one context.";
|
| + return false;
|
| + }
|
|
|
| - return std::string();
|
| + return true;
|
| }
|
|
|
| } // namespace extensions
|
|
|