Index: chrome/browser/ui/app_list/app_context_menu.cc |
diff --git a/chrome/browser/ui/app_list/app_context_menu.cc b/chrome/browser/ui/app_list/app_context_menu.cc |
index 43d3717688f34e56669e452f8c5a071241a65478..66bc14b3b49fb341fa2a5fec7e77b249a7d00a23 100644 |
--- a/chrome/browser/ui/app_list/app_context_menu.cc |
+++ b/chrome/browser/ui/app_list/app_context_menu.cc |
@@ -181,6 +181,15 @@ bool AppContextMenu::IsItemForCommandIdDynamic(int command_id) const { |
} |
base::string16 AppContextMenu::GetLabelForCommandId(int command_id) const { |
+ // If streamlined hosted apps are enabled, then we do not need to consider |
+ // the case when command_id == TOGGLE_PIN (see AppContextMenu::GetMenuModel). |
+ if (extensions::util::IsStreamlinedHostedAppsEnabled()) { |
+ DCHECK_EQ(LAUNCH_NEW, command_id); |
+ return IsCommandIdChecked(USE_LAUNCH_TYPE_REGULAR) ? |
+ l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_TAB) : |
+ l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_NEW_WINDOW); |
+ } |
+ |
if (command_id == TOGGLE_PIN) { |
return controller_->IsAppPinned(app_id_) ? |
l10n_util::GetStringUTF16(IDS_APP_LIST_CONTEXT_MENU_UNPIN) : |