diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 01:13:37 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-17 01:13:37 +0000 |
commit | fee8f0222a5f2a377ba5d7f2d3383481c02eafac (patch) | |
tree | 0542f26a1076b07d0857298b7a9fc694a61422cb /chrome/browser/extensions/extension_prefs.cc | |
parent | 8fa18a33d2dee21f748139ef503d08ebb4b706af (diff) | |
download | chromium_src-fee8f0222a5f2a377ba5d7f2d3383481c02eafac.zip chromium_src-fee8f0222a5f2a377ba5d7f2d3383481c02eafac.tar.gz chromium_src-fee8f0222a5f2a377ba5d7f2d3383481c02eafac.tar.bz2 |
Add a pref for the number of showing icons in the browser actions toolbar.
Also fix some issues on GTK concerning the proper behavior when adding/removing browser actions (container sizing + chevron visibility).
Windows uses a different pref (kBrowserActionContainerWidth), which is measured in pixels; it should be migrated to the new pref.
Also, register extension prefs during startup.
BUG=32101
TEST=manual
Review URL: http://codereview.chromium.org/841007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41800 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_prefs.cc')
-rw-r--r-- | chrome/browser/extensions/extension_prefs.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_prefs.cc b/chrome/browser/extensions/extension_prefs.cc index d4879ac..c9f391f 100644 --- a/chrome/browser/extensions/extension_prefs.cc +++ b/chrome/browser/extensions/extension_prefs.cc @@ -5,6 +5,7 @@ #include "base/string_util.h" #include "chrome/browser/extensions/extension_prefs.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/pref_names.h" using base::Time; @@ -60,12 +61,6 @@ const wchar_t kPrefIncognitoEnabled[] = L"incognito"; ExtensionPrefs::ExtensionPrefs(PrefService* prefs, const FilePath& root_dir) : prefs_(prefs), install_directory_(root_dir) { - if (!prefs_->FindPreference(kExtensionsPref)) - prefs_->RegisterDictionaryPref(kExtensionsPref); - if (!prefs->FindPreference(kExtensionShelf)) - prefs->RegisterListPref(kExtensionShelf); - if (!prefs->FindPreference(kExtensionToolbar)) - prefs->RegisterListPref(kExtensionToolbar); MakePathsRelative(); } @@ -580,3 +575,11 @@ ExtensionPrefs::ExtensionsInfo* ExtensionPrefs::CollectExtensionsInfo( return extensions_info; } + +// static +void ExtensionPrefs::RegisterUserPrefs(PrefService* prefs) { + prefs->RegisterDictionaryPref(kExtensionsPref); + prefs->RegisterListPref(kExtensionShelf); + prefs->RegisterListPref(kExtensionToolbar); + prefs->RegisterIntegerPref(prefs::kExtensionToolbarSize, -1); +} |