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

Unified Diff: chrome/common/extensions/feature.h

Issue 10025007: Convert tabs, windows, and extension APIs to feature system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: blah Created 8 years, 8 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
« no previous file with comments | « chrome/common/extensions/extension_unittest.cc ('k') | chrome/common/extensions/feature.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/feature.h
diff --git a/chrome/common/extensions/feature.h b/chrome/common/extensions/feature.h
index 374767055efe108258c92cb676e9402e0d474749..fc71b78ee50de20ab5f460a5b8c445b613b2d3cb 100644
--- a/chrome/common/extensions/feature.h
+++ b/chrome/common/extensions/feature.h
@@ -101,11 +101,14 @@ class Feature {
// Parses the JSON representation of a feature into the fields of this object.
// Unspecified values in the JSON are not modified in the object. This allows
// us to implement inheritance by parsing one value after another.
- void Parse(const DictionaryValue* value);
+ virtual void Parse(const DictionaryValue* value);
// Returns true if the feature contains the same values as another.
bool Equals(const Feature& other) const;
+ // Returns true if the Feature contains no specification.
+ bool IsEmpty() const;
+
// Returns true if the feature is available to be parsed into a new extension
// manifest.
Availability IsAvailableToManifest(const std::string& extension_id,
@@ -134,6 +137,11 @@ class Feature {
// Returns an error message for an Availability code.
std::string GetErrorMessage(Availability result);
+ protected:
+ static void ParseSet(const DictionaryValue* value,
+ const std::string& property,
+ std::set<std::string>* set);
+
private:
std::string name_;
« no previous file with comments | « chrome/common/extensions/extension_unittest.cc ('k') | chrome/common/extensions/feature.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698