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

Unified Diff: chrome/common/extensions/features/api_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: 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/api_feature.cc
diff --git a/chrome/common/extensions/features/api_feature.cc b/chrome/common/extensions/features/api_feature.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3cdbcfdd1343c9279fa9140edb3334393d2e0520
--- /dev/null
+++ b/chrome/common/extensions/features/api_feature.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/common/extensions/features/api_feature.h"
+
+namespace extensions {
+
+APIFeature::APIFeature() {
+}
+
+APIFeature::~APIFeature() {
+}
+
+bool APIFeature::Parse(const DictionaryValue* value) {
+ if (!SimpleFeature::Parse(value))
+ return false;
+
+ if (GetContexts()->empty()) {
+ LOG(ERROR) << name() << ": API features must specify at least one context.";
+ return false;
+ }
+ return true;
+}
+
+} // namespace

Powered by Google App Engine
This is Rietveld 408576698