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

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

Issue 15091002: Lazily load API schemas from resource files and convert all APIs to features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: optimize and "parent" property Created 7 years, 7 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/api_feature.cc
diff --git a/chrome/common/extensions/features/api_feature.cc b/chrome/common/extensions/features/api_feature.cc
index f6d826e2029d087a56755b4191a1090a651864b5..8203c66ea62b6be4cbf3cc6741cb8ee2db126072 100644
--- a/chrome/common/extensions/features/api_feature.cc
+++ b/chrome/common/extensions/features/api_feature.cc
@@ -16,6 +16,10 @@ bool APIFeature::IsInternal() const {
return internal_;
}
+bool APIFeature::HasParent() const {
+ return has_parent_;
+}
+
std::string APIFeature::Parse(const DictionaryValue* value) {
std::string error = SimpleFeature::Parse(value);
if (!error.empty())
@@ -23,6 +27,8 @@ std::string APIFeature::Parse(const DictionaryValue* value) {
value->GetBoolean("internal", &internal_);
+ has_parent_ = value->HasKey("parent");
+
if (GetContexts()->empty())
return name() + ": API features must specify at least one context.";

Powered by Google App Engine
This is Rietveld 408576698