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

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

Issue 10533086: Action box menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Action box menu 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 803fe64efd3a878b5f89fb7dfc7fc14a4fbfe778..67b9f178b5e81e960bd6c35abab4159a35d4bdd5 100644
--- a/chrome/browser/extensions/extension_prefs.h
+++ b/chrome/browser/extensions/extension_prefs.h
@@ -60,6 +60,7 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
typedef std::set<std::string> PrefKeySet;
// Vector containing identifiers for extensions.
+ // TODO(yefim): rename to ExtensionIds.
typedef std::vector<std::string> ExtensionIdSet;
// This enum is used for the launch type the user wants to use for an
@@ -103,11 +104,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
@@ -553,6 +556,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_;
« no previous file with comments | « chrome/browser/chromeos/login/simple_web_view_dialog.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698