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

Unified Diff: chrome/common/extensions/features/base_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: Renames and add TODO 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
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/features/base_feature_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/features/base_feature_provider.h
diff --git a/chrome/common/extensions/features/simple_feature_provider.h b/chrome/common/extensions/features/base_feature_provider.h
similarity index 61%
rename from chrome/common/extensions/features/simple_feature_provider.h
rename to chrome/common/extensions/features/base_feature_provider.h
index 6da884e256e042694e3ae102c764f42a7464d4e8..1e71b0d405249c56d0801f0ff1457a5c8354b9f4 100644
--- a/chrome/common/extensions/features/simple_feature_provider.h
+++ b/chrome/common/extensions/features/base_feature_provider.h
@@ -2,36 +2,37 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_PROVIDER_H_
-#define CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_PROVIDER_H_
+#ifndef CHROME_COMMON_EXTENSIONS_FEATURES_BASE_FEATURE_PROVIDER_H_
+#define CHROME_COMMON_EXTENSIONS_FEATURES_BASE_FEATURE_PROVIDER_H_
+#include <map>
#include <set>
#include <string>
#include "base/memory/linked_ptr.h"
#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 {
+class BaseFeatureProvider : public FeatureProvider {
public:
- typedef Feature*(*FeatureFactory)();
+ typedef SimpleFeature*(*FeatureFactory)();
- // Creates a new SimpleFeatureProvider. Pass null to |factory| to have the
+ // Creates a new BaseFeatureProvider. Pass null to |factory| to have the
// provider create plain old Feature instances.
- SimpleFeatureProvider(DictionaryValue* root, FeatureFactory factory);
- virtual ~SimpleFeatureProvider();
+ BaseFeatureProvider(const DictionaryValue& root, FeatureFactory factory);
+ virtual ~BaseFeatureProvider();
// Gets an instance for the _manifest_features.json file that is baked into
// Chrome as a resource.
- static SimpleFeatureProvider* GetManifestFeatures();
+ static BaseFeatureProvider* GetManifestFeatures();
// Gets an instance for the _permission_features.json file that is baked into
// Chrome as a resource.
- static SimpleFeatureProvider* GetPermissionFeatures();
+ static BaseFeatureProvider* GetPermissionFeatures();
// Returns all features described by this instance.
std::set<std::string> GetAllFeatureNames() const;
@@ -48,4 +49,4 @@ class SimpleFeatureProvider : public FeatureProvider {
} // namespace extensions
-#endif // CHROME_COMMON_EXTENSIONS_FEATURES_SIMPLE_FEATURE_PROVIDER_H_
+#endif // CHROME_COMMON_EXTENSIONS_FEATURES_BASE_FEATURE_PROVIDER_H_
« no previous file with comments | « chrome/common/extensions/extension.cc ('k') | chrome/common/extensions/features/base_feature_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698