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

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

Issue 10828316: Support multiple disable reasons in ExtensionPerfs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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 120ecf1394e949caf72376c5a9a67fa4db86709d..490b07d9375c570d84f056be1e7989d0a38aaa31 100644
--- a/chrome/browser/extensions/extension_prefs.h
+++ b/chrome/browser/extensions/extension_prefs.h
@@ -152,11 +152,12 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
bool did_escalate);
// Getter and setters for disabled reason.
- Extension::DisableReason GetDisableReason(
- const std::string& extension_id);
- void SetDisableReason(const std::string& extension_id,
+ int GetDisableReasons(const std::string& extension_id);
+ void AddDisableReason(const std::string& extension_id,
Extension::DisableReason disable_reason);
- void RemoveDisableReason(const std::string& extension_id);
+ void RemoveDisableReason(const std::string& extension_id,
+ Extension::DisableReason disable_reason);
+ void ClearDisableReasons(const std::string& extension_id);
// Returns the version string for the currently installed extension, or
// the empty string if not found.
@@ -554,6 +555,9 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
// Migrates the permissions data in the pref store.
void MigratePermissions(const ExtensionIdSet& extension_ids);
+ // Migrates the disable reasons from a single enum to a bit mask.
+ void MigrateDisableReasons(const ExtensionIdSet& extension_ids);
+
// Checks whether there is a state pref for the extension and if so, whether
// it matches |check_state|.
bool DoesExtensionHaveState(const std::string& id,

Powered by Google App Engine
This is Rietveld 408576698