diff options
Diffstat (limited to 'chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc')
-rw-r--r-- | chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc index bdfb818..656f47a 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc @@ -1054,8 +1054,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(); } @@ -1068,8 +1067,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(); } @@ -1817,18 +1815,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::ShelfItemType type = model_->items()[i].type; if (type == ash::TYPE_APP_SHORTCUT || - ((is_app_list || alternate) && type == ash::TYPE_APP_LIST) || + (is_app_list && type == ash::TYPE_APP_LIST) || type == ash::TYPE_BROWSER_SHORTCUT) { return i; } @@ -1918,10 +1915,7 @@ 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(), kAppShelfIdPlaceholder); - else - pinned_apps.push_back(kAppShelfIdPlaceholder); + pinned_apps.insert(pinned_apps.begin(), kAppShelfIdPlaceholder); } return pinned_apps; } |