| 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 b61c67cfb3aa76065db6de7b2100c3088f5f369d..29971f0a4c674dd573ee5b6c52d0d16fe73e36d9 100644
|
| --- a/chrome/browser/ui/views/browser_actions_container.cc
|
| +++ b/chrome/browser/ui/views/browser_actions_container.cc
|
| @@ -55,11 +55,22 @@
|
| #include "ui/views/controls/resize_area.h"
|
| #include "ui/views/metrics.h"
|
|
|
| +namespace {
|
| +
|
| // Horizontal spacing between most items in the container, as well as after the
|
| // last item or chevron (if visible).
|
| -static const int kItemSpacing = ToolbarView::kStandardSpacing;
|
| +const int kItemSpacing = ToolbarView::kStandardSpacing;
|
| +
|
| // Horizontal spacing before the chevron (if visible).
|
| -static const int kChevronSpacing = kItemSpacing - 2;
|
| +const int kChevronSpacing = kItemSpacing - 2;
|
| +
|
| +void RegisterUserPrefs(PrefService* prefs) {
|
| + prefs->RegisterIntegerPref(prefs::kBrowserActionContainerWidth,
|
| + 0,
|
| + PrefService::UNSYNCABLE_PREF);
|
| +}
|
| +
|
| +} // namespace
|
|
|
| // static
|
| bool BrowserActionsContainer::disable_animations_during_testing_ = false;
|
| @@ -425,16 +436,13 @@ BrowserActionsContainer::~BrowserActionsContainer() {
|
| DeleteBrowserActionViews();
|
| }
|
|
|
| -// Static.
|
| -void BrowserActionsContainer::RegisterUserPrefs(PrefService* prefs) {
|
| - prefs->RegisterIntegerPref(prefs::kBrowserActionContainerWidth,
|
| - 0,
|
| - PrefService::UNSYNCABLE_PREF);
|
| -}
|
| -
|
| void BrowserActionsContainer::Init() {
|
| LoadImages();
|
|
|
| + if (!profile_->GetPrefs()->FindPreference(
|
| + prefs::kBrowserActionContainerWidth))
|
| + RegisterUserPrefs(profile_->GetPrefs());
|
| +
|
| // 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_ &&
|
|
|