| Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
|
| diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
|
| index 824c74fc30cc66999fb3a560a48b5e9560dfaa29..16f297b8119fbd75b7a40e048c795853ef9e6138 100644
|
| --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
|
| +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
|
| @@ -1121,8 +1121,7 @@ void ChromeLauncherController::ShelfItemAdded(int index) {
|
| // The app list launcher can get added to the shelf after we applied the
|
| // preferences. In that case the item might be at the wrong spot. As such we
|
| // call the function again.
|
| - if (model_->items()[index].type == ash::TYPE_APP_LIST &&
|
| - ash::switches::UseAlternateShelfLayout())
|
| + if (model_->items()[index].type == ash::TYPE_APP_LIST)
|
| UpdateAppLaunchersFromPref();
|
| }
|
|
|
| @@ -1135,8 +1134,7 @@ void ChromeLauncherController::ShelfItemMoved(int start_index,
|
| // We remember the moved item position if it is either pinnable or
|
| // it is the app list with the alternate shelf layout.
|
| if ((HasItemController(item.id) && IsPinned(item.id)) ||
|
| - (ash::switches::UseAlternateShelfLayout() &&
|
| - item.type == ash::TYPE_APP_LIST))
|
| + item.type == ash::TYPE_APP_LIST)
|
| PersistPinnedState();
|
| }
|
|
|
| @@ -1877,18 +1875,17 @@ void ChromeLauncherController::MoveChromeOrApplistToFinalPosition(
|
| }
|
|
|
| int ChromeLauncherController::FindInsertionPoint(bool is_app_list) {
|
| - bool alternate = ash::switches::UseAlternateShelfLayout();
|
| // Keeping this change small to backport to M33&32 (see crbug.com/329597).
|
| // TODO(skuhne): With the removal of the legacy shelf layout we should remove
|
| // the ability to move the app list item since this was never used. We should
|
| // instead ask the ShelfModel::ValidateInsertionIndex or similir for an index.
|
| - if (is_app_list && alternate)
|
| + if (is_app_list)
|
| return 0;
|
|
|
| for (int i = model_->item_count() - 1; i > 0; --i) {
|
| ash::LauncherItemType type = model_->items()[i].type;
|
| if (type == ash::TYPE_APP_SHORTCUT ||
|
| - ((is_app_list || alternate) && type == ash::TYPE_APP_LIST) ||
|
| + type == ash::TYPE_APP_LIST ||
|
| type == ash::TYPE_BROWSER_SHORTCUT ||
|
| type == ash::TYPE_WINDOWED_APP)
|
| return i;
|
| @@ -1977,12 +1974,8 @@ ChromeLauncherController::GetListOfPinnedAppsAndBrowser() {
|
|
|
| // If not added yet, add the app list item either at the end or at the
|
| // beginning - depending on the shelf layout.
|
| - if (!app_list_icon_added) {
|
| - if (ash::switches::UseAlternateShelfLayout())
|
| - pinned_apps.insert(pinned_apps.begin(), kAppLauncherIdPlaceholder);
|
| - else
|
| - pinned_apps.push_back(kAppLauncherIdPlaceholder);
|
| - }
|
| + if (!app_list_icon_added)
|
| + pinned_apps.insert(pinned_apps.begin(), kAppLauncherIdPlaceholder);
|
| return pinned_apps;
|
| }
|
|
|
|
|