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..1cfc5ca15fb8bfd59b13e6b89e36d016c76c5e9d 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(command_id == LAUNCH_NEW); |
tapted
2015/01/06 01:47:10
DCHECK_EQ(LAUNCH_NEW, command_id);
(sometimes you
mitchellj
2015/01/06 01:50:21
Done.
|
+ 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) : |