- if (!profile_->GetPrefs()->HasPrefPath(
- extensions::pref_names::kToolbarSize)) {
- // Migration code to the new VisibleIconCount pref.
- // TODO(mpcomplete): remove this at some point.
- double predefinedWidth = profile_->GetPrefs()->GetDouble(
- extensions::pref_names::kBrowserActionContainerWidth);
- if (predefinedWidth != 0) {
- int iconWidth = kBrowserActionWidth + kBrowserActionButtonPadding;
- int extraWidth = kChevronWidth;
- toolbarModel_->SetVisibleIconCount(
- (predefinedWidth - extraWidth) / iconWidth);
- }
- }