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

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

Issue 3129003: remove toolstrips (Closed)
Patch Set: merge Created 10 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.cc
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc
index e98706564cde8038296a8f3e7ae1486c8c1899aa..c33ea33ef42b0569249ae1b8c2ba6e4e97786d49 100644
--- a/chrome/browser/extensions/extension_prefs.cc
+++ b/chrome/browser/extensions/extension_prefs.cc
@@ -41,10 +41,6 @@ const char kPrefBlacklist[] = "blacklist";
// Indicates whether to show an install warning when the user enables.
const char kExtensionDidEscalatePermissions[] = "install_warning_on_enable";
-// A preference that tracks extension shelf configuration. This is a list
-// object read from the Preferences file, containing a list of toolstrip URLs.
-const char kExtensionShelf[] = "extensions.shelf";
-
// A preference that tracks admin policy regarding which extensions the user
// can and can not install. This preference is a list object, containing
// strings that list extension ids. Denylist can contain "*" meaning all
@@ -438,29 +434,6 @@ void ExtensionPrefs::GetKilledExtensionIds(std::set<std::string>* killed_ids) {
}
}
-ExtensionPrefs::URLList ExtensionPrefs::GetShelfToolstripOrder() {
- URLList urls;
- const ListValue* toolstrip_urls = prefs_->GetList(kExtensionShelf);
- if (toolstrip_urls) {
- for (size_t i = 0; i < toolstrip_urls->GetSize(); ++i) {
- std::string url;
- if (toolstrip_urls->GetString(i, &url))
- urls.push_back(GURL(url));
- }
- }
- return urls;
-}
-
-void ExtensionPrefs::SetShelfToolstripOrder(const URLList& urls) {
- ListValue* toolstrip_urls = prefs_->GetMutableList(kExtensionShelf);
- toolstrip_urls->Clear();
- for (size_t i = 0; i < urls.size(); ++i) {
- GURL url = urls[i];
- toolstrip_urls->Append(new StringValue(url.spec()));
- }
- prefs_->ScheduleSavePersistentPrefs();
-}
-
std::vector<std::string> ExtensionPrefs::GetToolbarOrder() {
std::vector<std::string> extension_ids;
const ListValue* toolbar_order = prefs_->GetList(kExtensionToolbar);
@@ -821,7 +794,6 @@ std::set<std::string> ExtensionPrefs::GetIdleInstallInfoIds() {
// static
void ExtensionPrefs::RegisterUserPrefs(PrefService* prefs) {
prefs->RegisterDictionaryPref(kExtensionsPref);
- prefs->RegisterListPref(kExtensionShelf);
prefs->RegisterListPref(kExtensionToolbar);
prefs->RegisterIntegerPref(prefs::kExtensionToolbarSize, -1);
prefs->RegisterDictionaryPref(kExtensionsBlacklistUpdate);
« no previous file with comments | « chrome/browser/extensions/extension_popup_apitest.cc ('k') | chrome/browser/extensions/extension_process_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698