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

Unified Diff: chrome/browser/extensions/component_loader.h

Issue 8659002: Adding the --load-component-extension flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a unit test. Created 9 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
Index: chrome/browser/extensions/component_loader.h
diff --git a/chrome/browser/extensions/component_loader.h b/chrome/browser/extensions/component_loader.h
index ec7726975f7ae09c1253f8025e5b8858396beb75..af121356ebf89c3251adefb5bbce2c3039866ce1 100644
--- a/chrome/browser/extensions/component_loader.h
+++ b/chrome/browser/extensions/component_loader.h
@@ -41,9 +41,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 previusly added
Aaron Boodman 2011/12/05 22:11:26 typo: priviusly
SeRya 2011/12/06 08:19:27 Done.
+ // 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.
//
@@ -69,6 +74,10 @@ class ComponentLoader : public content::NotificationObserver {
// Clear the list of registered extensions.
void ClearAllRegistered();
+ size_t GetRegisteredExtensionsCount() const {
+ return component_extensions_.size();
Aaron Boodman 2011/12/05 22:11:26 extra space after 'return'
SeRya 2011/12/06 08:19:27 Done.
+ }
+
private:
// Information about a registered component extension.
struct ComponentExtensionInfo {
@@ -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 added.
Aaron Boodman 2011/12/05 22:11:26 missing word 'been' after 'has'
SeRya 2011/12/06 08:19:27 Done.
+ bool Exists(const std::string& id) const;
+
+ // Determine the extension id.
+ static std::string GenerateId(const base::DictionaryValue* manifest);
+
PrefService* prefs_;
PrefService* local_state_;
« no previous file with comments | « no previous file | chrome/browser/extensions/component_loader.cc » ('j') | chrome/browser/extensions/component_loader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698