Chromium Code Reviews| Index: chrome/common/extensions/api/extension_api.h |
| diff --git a/chrome/common/extensions/api/extension_api.h b/chrome/common/extensions/api/extension_api.h |
| index 924ee8cb52abd76914f8ef9d7fccbeb4463f0b3c..8a83334f06ce71d6325228245a825add98a53eec 100644 |
| --- a/chrome/common/extensions/api/extension_api.h |
| +++ b/chrome/common/extensions/api/extension_api.h |
| @@ -37,7 +37,7 @@ class Feature; |
| // WARNING: This class is accessed on multiple threads in the browser process |
| // (see ExtensionFunctionDispatcher). No state should be modified after |
| // construction. |
| -class ExtensionAPI : public FeatureProvider { |
| +class ExtensionAPI { |
| public: |
| // Returns a single shared instance of this class. This is the typical use |
| // case in Chrome. |
| @@ -88,11 +88,6 @@ class ExtensionAPI : public FeatureProvider { |
| std::set<std::string> GetAllAPINames(); |
| - // Gets a Feature object describing the API with the specified |full_name|. |
| - // This can be either an API namespace (like history, or |
| - // experimental.bookmarks), or it can be an individual function or event. |
| - virtual Feature* GetFeature(const std::string& full_name) OVERRIDE; |
| - |
| // Splits a full name from the extension API into its API and child name |
| // parts. Some examples: |
| // |
| @@ -107,6 +102,9 @@ class ExtensionAPI : public FeatureProvider { |
| void InitDefaultConfiguration(); |
| + // Gets a feature from any dependency provider registered with ExtensionAPI. |
| + Feature* GetFeatureDependency(const std::string& dependency_name); |
|
not at google - send to devlin
2013/03/26 00:34:48
This doesn't appear to be used outside of this cla
cduvall
2013/03/26 19:24:05
It's used in the unit test.
|
| + |
| private: |
| friend struct DefaultSingletonTraits<ExtensionAPI>; |
| @@ -137,20 +135,9 @@ class ExtensionAPI : public FeatureProvider { |
| // Returns true if the API uses the feature system. |
| bool UsesFeatureSystem(const std::string& full_name); |
| - // Gets a feature from any dependency provider. |
| - Feature* GetFeatureDependency(const std::string& dependency_name); |
| - |
| - // Adds dependent schemas to |out| as determined by the "dependencies" |
| - // property. |
| - // TODO(aa): Consider making public and adding tests. |
| - void ResolveDependencies(std::set<std::string>* out); |
| - |
| - // Adds any APIs listed in "dependencies" found in the schema for |api_name| |
| - // but not in |excluding| to |out|. |
| - void GetMissingDependencies( |
| - const std::string& api_name, |
| - const std::set<std::string>& excluding, |
| - std::set<std::string>* out); |
| + // Attempts to get a feature from any dependency provider, and returns NULL |
| + // if the feature could not be found. |
| + Feature* TryGetFeatureDependency(const std::string& dependency_name); |
| // Checks if an API is *entirely* privileged. This won't include APIs such as |
| // "storage" which is entirely unprivileged, nor "extension" which has |