diff options
author | serya@chromium.org <serya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 08:52:10 +0000 |
---|---|---|
committer | serya@chromium.org <serya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 08:52:10 +0000 |
commit | 43cbd759bddfc293d3dfc315c7b7ee893fe50c4e (patch) | |
tree | c045ff9c848b51e4280b93d5b37d379c874ab642 /chrome/browser/extensions/component_loader.h | |
parent | 0fd2fb36c96bc3df5f22de9cc1a8e37606e95cb5 (diff) | |
download | chromium_src-43cbd759bddfc293d3dfc315c7b7ee893fe50c4e.zip chromium_src-43cbd759bddfc293d3dfc315c7b7ee893fe50c4e.tar.gz chromium_src-43cbd759bddfc293d3dfc315c7b7ee893fe50c4e.tar.bz2 |
Removed flag --expose-private-extension-api. Added --load-component-extension.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/8659002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113578 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/component_loader.h')
-rw-r--r-- | chrome/browser/extensions/component_loader.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/extensions/component_loader.h b/chrome/browser/extensions/component_loader.h index ec77269..63996b1 100644 --- a/chrome/browser/extensions/component_loader.h +++ b/chrome/browser/extensions/component_loader.h @@ -28,6 +28,10 @@ class ComponentLoader : public content::NotificationObserver { PrefService* local_state); virtual ~ComponentLoader(); + size_t registered_extensions_count() const { + return component_extensions_.size(); + } + // Loads any registered component extensions. void LoadAll(); @@ -41,9 +45,14 @@ class ComponentLoader : public content::NotificationObserver { const Extension* Add(int manifest_resource_id, const FilePath& root_directory); + // Loads a component extension from file system. Replaces previously added + // extension with the same ID. + const Extension* AddOrReplace(const FilePath& path); + // Unloads a component extension and removes it from the list of component // extensions to be loaded. void Remove(const FilePath& root_directory); + void Remove(const std::string& id); // Adds the default component extensions. // @@ -96,6 +105,12 @@ class ComponentLoader : public content::NotificationObserver { // Add the enterprise webstore extension, or reload it if already loaded. void AddOrReloadEnterpriseWebStore(); + // Returns true if an extension with the specified id has been added. + bool Exists(const std::string& id) const; + + // Determine the extension id. + static std::string GenerateId(const base::DictionaryValue* manifest); + PrefService* prefs_; PrefService* local_state_; |