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

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

Issue 2151583003: [Extensions] Add extension feature generation code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dirk's Created 4 years, 5 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: extensions/common/features/api_feature.cc
diff --git a/extensions/common/features/api_feature.cc b/extensions/common/features/api_feature.cc
index e3e4c91b6db3796a5d548d38b6ef5bd9576fca3e..0ec3c3850085bf3db2f5a5fd01b64981affb306e 100644
--- a/extensions/common/features/api_feature.cc
+++ b/extensions/common/features/api_feature.cc
@@ -6,24 +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 internal = false;
+ if (value->GetBoolean("internal", &internal))
+ set_internal(internal);
- if (contexts()->empty())
+ if (contexts().empty())
return name() + ": API features must specify at least one context.";
return std::string();

Powered by Google App Engine
This is Rietveld 408576698