From b6ab96da13cdfe15f38fbebcd22e0a1db5a50381 Mon Sep 17 00:00:00 2001 From: "mpcomplete@chromium.org" Date: Thu, 20 Aug 2009 18:58:19 +0000 Subject: 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 --- chrome/browser/extensions/extension_prefs.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'chrome/browser/extensions/extension_prefs.h') 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::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. -- cgit v1.1