| Index: chrome/browser/ui/views/browser_actions_container.cc
|
| diff --git a/chrome/browser/ui/views/browser_actions_container.cc b/chrome/browser/ui/views/browser_actions_container.cc
|
| index 0d84413ede2df072ea62f0696cd1e203ad2a348d..87cd2a34dd9d159977bd90331e152c421bc77b3a 100644
|
| --- a/chrome/browser/ui/views/browser_actions_container.cc
|
| +++ b/chrome/browser/ui/views/browser_actions_container.cc
|
| @@ -47,12 +47,6 @@ const int kItemSpacing = ToolbarView::kStandardSpacing;
|
| // Horizontal spacing before the chevron (if visible).
|
| const int kChevronSpacing = kItemSpacing - 2;
|
|
|
| -void RegisterUserPrefs(PrefRegistrySyncable* registry) {
|
| - registry->RegisterIntegerPref(prefs::kBrowserActionContainerWidth,
|
| - 0,
|
| - PrefRegistrySyncable::UNSYNCABLE_PREF);
|
| -}
|
| -
|
| } // namespace
|
|
|
| // static
|
| @@ -61,6 +55,14 @@ bool BrowserActionsContainer::disable_animations_during_testing_ = false;
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // BrowserActionsContainer
|
|
|
| +// static
|
| +void BrowserActionsContainer::RegisterUserPrefs(
|
| + PrefRegistrySyncable* registry) {
|
| + registry->RegisterIntegerPref(prefs::kBrowserActionContainerWidth,
|
| + 0,
|
| + PrefRegistrySyncable::UNSYNCABLE_PREF);
|
| +}
|
| +
|
| BrowserActionsContainer::BrowserActionsContainer(Browser* browser,
|
| View* owner_view)
|
| : profile_(browser->profile()),
|
| @@ -119,14 +121,6 @@ BrowserActionsContainer::~BrowserActionsContainer() {
|
| void BrowserActionsContainer::Init() {
|
| LoadImages();
|
|
|
| - // TODO(joi): Switch to official way of registering user prefs for
|
| - // this class, i.e. in a function called from
|
| - // browser_prefs::RegisterUserPrefs.
|
| - if (!profile_->GetPrefs()->FindPreference(
|
| - prefs::kBrowserActionContainerWidth))
|
| - RegisterUserPrefs(static_cast<PrefRegistrySyncable*>(
|
| - profile_->GetPrefs()->DeprecatedGetPrefRegistry()));
|
| -
|
| // We wait to set the container width until now so that the chevron images
|
| // will be loaded. The width calculation needs to know the chevron size.
|
| if (model_ &&
|
|
|