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

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

Issue 9978012: Revert 130697 - Reland r130462: Implement FeatureProvider for ExtensionAPI." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « chrome/common/extensions/permission_feature.cc ('k') | chrome/common/extensions/simple_feature_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/simple_feature_provider.h
===================================================================
--- chrome/common/extensions/simple_feature_provider.h (revision 130700)
+++ chrome/common/extensions/simple_feature_provider.h (working copy)
@@ -12,21 +12,17 @@
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
#include "chrome/common/extensions/feature.h"
-#include "chrome/common/extensions/feature_provider.h"
namespace extensions {
// Reads Features out of a simple JSON file description.
-class SimpleFeatureProvider : public FeatureProvider {
+class SimpleFeatureProvider {
public:
- typedef Feature*(*FeatureFactory)();
+ // Create an instance for an arbitrary hunk of JSON. This is typically used
+ // during tests.
+ explicit SimpleFeatureProvider(scoped_ptr<DictionaryValue> root);
+ ~SimpleFeatureProvider();
- // Creates a new SimpleFeatureProvider. Pass null to |factory| to have the
- // provider create plain old Feature instances.
- SimpleFeatureProvider(scoped_ptr<DictionaryValue> root,
- FeatureFactory factory);
- virtual ~SimpleFeatureProvider();
-
// Gets an instance for the _manifest_features.json file that is baked into
// Chrome as a resource.
static SimpleFeatureProvider* GetManifestFeatures();
@@ -39,12 +35,10 @@
std::set<std::string> GetAllFeatureNames() const;
// Gets the feature |feature_name|, if it exists.
- virtual scoped_ptr<Feature> GetFeature(
- const std::string& feature_name) OVERRIDE;
+ scoped_ptr<Feature> GetFeature(const std::string& feature_name) const;
private:
scoped_ptr<DictionaryValue> root_;
- FeatureFactory factory_;
};
} // namespace extensions
« no previous file with comments | « chrome/common/extensions/permission_feature.cc ('k') | chrome/common/extensions/simple_feature_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698