Index: chrome/browser/extensions/extension_prefs.h |
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h |
index 51d61168aba35660e9020487ff8b7f820664d04b..d9f12a5a13333f441cbc0dad9ad211cbb806e92a 100644 |
--- a/chrome/browser/extensions/extension_prefs.h |
+++ b/chrome/browser/extensions/extension_prefs.h |
@@ -59,6 +59,7 @@ class ExtensionPrefs : public ContentSettingsStore::Observer, |
typedef std::set<std::string> PrefKeySet; |
// Vector containing identifiers for extensions. |
+ // TODO(yefim): rename to ExtensionIdList. |
Peter Kasting
2012/08/03 23:17:42
Nit: Or ExtensionIds, which might be less misleadi
yefimt
2012/08/07 00:47:06
Done.
|
typedef std::vector<std::string> ExtensionIdSet; |
// This enum is used for the launch type the user wants to use for an |
@@ -102,11 +103,13 @@ class ExtensionPrefs : public ContentSettingsStore::Observer, |
// ExtensionService::IsExtensionEnabled instead. |
bool IsExtensionDisabled(const std::string& id) const; |
- // Get the order that the browser actions appear in the toolbar. |
- std::vector<std::string> GetToolbarOrder(); |
+ // Get/Set the order that the browser actions appear in the toolbar. |
+ ExtensionIdSet GetToolbarOrder(); |
+ void SetToolbarOrder(const ExtensionIdSet& extension_ids); |
- // Set the order that the browser actions appear in the toolbar. |
- void SetToolbarOrder(const std::vector<std::string>& extension_ids); |
+ // Get/Set the order that the browser actions appear in the action box. |
+ ExtensionIdSet GetActionBoxOrder(); |
+ void SetActionBoxOrder(const ExtensionIdSet& extension_ids); |
// Called when an extension is installed, so that prefs get created. |
// If |page_ordinal| is an invalid ordinal, then a page will be found |
@@ -544,6 +547,11 @@ class ExtensionPrefs : public ContentSettingsStore::Observer, |
bool DoesExtensionHaveState(const std::string& id, |
Extension::State check_state) const; |
+ // Helper function to Get/Set array of strings from/to prefs. |
+ ExtensionIdSet GetExtensionPrefAsVector(const char* pref); |
+ void SetExtensionPrefFromVector(const char* pref, |
+ const ExtensionIdSet& extension_ids); |
+ |
// The pref service specific to this set of extension prefs. Owned by profile. |
PrefService* prefs_; |