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 6a5685baeec4e5f721031432e0f0bafc97e3ff1a..ed1936de7b4892dd438b246eb54fe695b1092236 100644 |
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc |
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc |
@@ -1091,8 +1091,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(); |
} |
@@ -1105,8 +1104,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(); |
} |
@@ -1869,18 +1867,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) || |
+ type == ash::TYPE_APP_LIST || |
type == ash::TYPE_BROWSER_SHORTCUT || |
type == ash::TYPE_WINDOWED_APP) |
return i; |
@@ -1969,12 +1966,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(), kAppShelfIdPlaceholder); |
- else |
- pinned_apps.push_back(kAppShelfIdPlaceholder); |
- } |
+ if (!app_list_icon_added) |
+ pinned_apps.insert(pinned_apps.begin(), kAppShelfIdPlaceholder); |
return pinned_apps; |
} |