| 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
|
|
|