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

Unified Diff: chrome/common/extensions/features/simple_feature_provider.h

Issue 11316164: Implement ComplexFeature to support permission features with multiple rules. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new Created 8 years 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/simple_feature_provider.h
diff --git a/chrome/common/extensions/features/simple_feature_provider.h b/chrome/common/extensions/features/simple_feature_provider.h
index 6da884e256e042694e3ae102c764f42a7464d4e8..e4000dee0e9e9d396ce7a8f5dc386ea54b1cf7b1 100644
--- a/chrome/common/extensions/features/simple_feature_provider.h
+++ b/chrome/common/extensions/features/simple_feature_provider.h
@@ -5,6 +5,7 @@
#ifndef CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_PROVIDER_H_
#define CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_PROVIDER_H_
+#include <map>
#include <set>
#include <string>
@@ -12,13 +13,14 @@
#include "base/values.h"
#include "chrome/common/extensions/features/feature.h"
#include "chrome/common/extensions/features/feature_provider.h"
+#include "chrome/common/extensions/features/simple_feature.h"
namespace extensions {
// Reads Features out of a simple JSON file description.
class SimpleFeatureProvider : public FeatureProvider {
public:
- typedef Feature*(*FeatureFactory)();
+ typedef SimpleFeature*(*FeatureFactory)();
// Creates a new SimpleFeatureProvider. Pass null to |factory| to have the
// provider create plain old Feature instances.
@@ -37,10 +39,10 @@ class SimpleFeatureProvider : public FeatureProvider {
std::set<std::string> GetAllFeatureNames() const;
// Gets the feature |feature_name|, if it exists.
- virtual Feature* GetFeature(const std::string& feature_name) OVERRIDE;
+ virtual SimpleFeature* GetFeature(const std::string& feature_name) OVERRIDE;
private:
- typedef std::map<std::string, linked_ptr<Feature> > FeatureMap;
+ typedef std::map<std::string, linked_ptr<SimpleFeature> > FeatureMap;
FeatureMap features_;
FeatureFactory factory_;

Powered by Google App Engine
This is Rietveld 408576698