Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8829)

Unified Diff: chrome/common/extensions/features/manifest_feature.cc

Issue 12846011: Implement API features for the Extension API feature system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed memory leak Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/features/manifest_feature.cc
diff --git a/chrome/common/extensions/features/manifest_feature.cc b/chrome/common/extensions/features/manifest_feature.cc
index 51d9fd51d5c39746fa52d00b74f5f0b0b3d6a1e5..cd4a53feabb7aafbe4637e2a21939f8a39a375a9 100644
--- a/chrome/common/extensions/features/manifest_feature.cc
+++ b/chrome/common/extensions/features/manifest_feature.cc
@@ -34,4 +34,20 @@ Feature::Availability ManifestFeature::IsAvailableToContext(
return CreateAvailability(IS_AVAILABLE);
}
+std::string ManifestFeature::Parse(const DictionaryValue* value) {
+ std::string error = SimpleFeature::Parse(value);
+ if (!error.empty())
+ return error;
+
+ if (extension_types()->empty()) {
+ return name() + ": Manifest features must specify at least one " +
+ "value for extension_types.";
+ }
+
+ if (!GetContexts()->empty())
+ return name() + ": Manifest features do not support contexts.";
+
+ return "";
+}
+
} // namespace
« no previous file with comments | « chrome/common/extensions/features/manifest_feature.h ('k') | chrome/common/extensions/features/permission_feature.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698