diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-29 23:14:02 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-29 23:14:02 +0000 |
commit | 9adb9693e8a90bb63be325dbb5d3391f47f839ba (patch) | |
tree | 555765afd7bc851de6f3a2bf4a35151435d58d77 /chrome/browser/extensions/extension_pref_store.h | |
parent | 5b5a5c976aead85a87ced0847c068012d3979cae (diff) | |
download | chromium_src-9adb9693e8a90bb63be325dbb5d3391f47f839ba.zip chromium_src-9adb9693e8a90bb63be325dbb5d3391f47f839ba.tar.gz chromium_src-9adb9693e8a90bb63be325dbb5d3391f47f839ba.tar.bz2 |
Part 3 of immutable Extension refactor.
Make ExtensionsService hold const Extension pointers only. This ensures that
extensions can't be modified after they're created, and lets us share them
between threads.
BUG=56558
TEST=no functional change
Review URL: http://codereview.chromium.org/4138006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64517 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_pref_store.h')
-rw-r--r-- | chrome/browser/extensions/extension_pref_store.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/browser/extensions/extension_pref_store.h b/chrome/browser/extensions/extension_pref_store.h index 926f29e..00248c3 100644 --- a/chrome/browser/extensions/extension_pref_store.h +++ b/chrome/browser/extensions/extension_pref_store.h @@ -39,13 +39,13 @@ class ExtensionPrefStore : public PrefStore, // Begins tracking the preference and value an extension wishes to set. This // must be called each time an extension API tries to set a preference. // The ExtensionPrefStore will take ownership of the |pref_value|. - virtual void InstallExtensionPref(Extension* extension, + virtual void InstallExtensionPref(const Extension* extension, const char* pref_path, Value* pref_value); // Removes an extension and all its preference settings from this PrefStore. // This must be called when an extension is uninstalled or disabled. - virtual void UninstallExtension(Extension* extension); + virtual void UninstallExtension(const Extension* extension); // PrefStore methods: virtual DictionaryValue* prefs() { return prefs_.get(); } @@ -56,7 +56,7 @@ class ExtensionPrefStore : public PrefStore, // The nested pairs are <extension, <pref_path, pref_value> >. This is here, // rather than in (say) notification_type.h, to keep the dependency on // std::pair out of the many places that include notification_type.h. - typedef std::pair<Extension*, std::pair<const char*, Value*> > + typedef std::pair<const Extension*, std::pair<const char*, Value*> > ExtensionPrefDetails; protected: @@ -95,10 +95,10 @@ class ExtensionPrefStore : public PrefStore, // Associates an extension with the prefs it sets. Owns the pref values. struct ExtensionPrefs { - ExtensionPrefs(Extension* extension, PrefValueMap* values); + ExtensionPrefs(const Extension* extension, PrefValueMap* values); ~ExtensionPrefs(); - Extension* extension; + const Extension* extension; PrefValueMap* pref_values; }; |