diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 18:58:19 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-20 18:58:19 +0000 |
commit | b6ab96da13cdfe15f38fbebcd22e0a1db5a50381 (patch) | |
tree | 99e4977793b780210f6aceca8ae544612065a33a /chrome/browser/extensions/extension_prefs.h | |
parent | 49c97336d0262072c413ca802c4818a419e3b620 (diff) | |
download | chromium_src-b6ab96da13cdfe15f38fbebcd22e0a1db5a50381.zip chromium_src-b6ab96da13cdfe15f38fbebcd22e0a1db5a50381.tar.gz chromium_src-b6ab96da13cdfe15f38fbebcd22e0a1db5a50381.tar.bz2 |
Get rid of the extension's "Current Version" file.
The entire manifest.json value is now stored in the prefs file. This will
allow for quick extension checks on startup.
BUG=18293
TEST=Make sure installing/upgrading/uninstalling extensions works as expected.
Review URL: http://codereview.chromium.org/174036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_prefs.h')
-rw-r--r-- | chrome/browser/extensions/extension_prefs.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h index 291556c..59adfd8 100644 --- a/chrome/browser/extensions/extension_prefs.h +++ b/chrome/browser/extensions/extension_prefs.h @@ -49,6 +49,13 @@ class ExtensionPrefs { // Called to change the extension's state when it is enabled/disabled. void SetExtensionState(Extension* extension, Extension::State); + // Returns the version string for the currently installed extension, or + // the empty string if not found. + std::string GetVersionString(const std::string& extension_id); + + // Ensure old extensions have fully up-to-date prefs values. + void MigrateToPrefs(Extension* extension); + // Returns base extensions install directory. const FilePath& install_directory() const { return install_directory_; } @@ -106,19 +113,16 @@ class InstalledExtensions { explicit InstalledExtensions(ExtensionPrefs* prefs); ~InstalledExtensions(); - typedef Callback3<const std::string&, + typedef Callback4<DictionaryValue*, + const std::string&, const FilePath&, Extension::Location>::Type Callback; // Runs |callback| for each installed extension with the path to the // version directory and the location. Blacklisted extensions won't trigger - // the callback. + // the callback. Ownership of |callback| is transferred to callee. void VisitInstalledExtensions(Callback *callback); - // Same as above, but only for the given extension. - void VisitInstalledExtension(const std::string& extension_id, - Callback *callback); - private: // A copy of the extensions pref dictionary so that this can be passed // around without a dependency on prefs. |