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

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

Issue 174036: Get rid of the extension's "Current Version" file. (Closed)
Patch Set: merge conflicts Created 11 years, 4 months 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/extension_prefs.h
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
index 291556c79b482cd8db487a623b33d2ec47622c67..59adfd87de9e0aba24531e4be1d73dcd5e589638 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.
« no previous file with comments | « chrome/browser/extensions/extension_file_util_unittest.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698