Chromium Code Reviews| Index: chrome/browser/ui/toolbar/wrench_menu_model.cc |
| diff --git a/chrome/browser/ui/toolbar/wrench_menu_model.cc b/chrome/browser/ui/toolbar/wrench_menu_model.cc |
| index b49610d303f4b3f4b00d184c5d40c13ff3ebd6cb..095f26422342d3f173bf347b27ccef0900407490 100644 |
| --- a/chrome/browser/ui/toolbar/wrench_menu_model.cc |
| +++ b/chrome/browser/ui/toolbar/wrench_menu_model.cc |
| @@ -277,8 +277,7 @@ bool WrenchMenuModel::IsItemForCommandIdDynamic(int command_id) const { |
| #elif defined(OS_WIN) |
| command_id == IDC_PIN_TO_START_SCREEN || |
| #endif |
| - command_id == IDC_UPGRADE_DIALOG || |
| - command_id == IDC_SHOW_SIGNIN; |
|
noms (inactive)
2014/05/11 19:21:25
Hmm, can we delete this already? Shouldn't we stil
Roger Tawa OOO till Jul 10th
2014/05/13 21:23:54
Nope. All changes in this file must be kept for p
noms (inactive)
2014/05/13 22:57:00
I guess what I was trying to say was: it looks lik
Roger Tawa OOO till Jul 10th
2014/05/14 14:02:13
Correct, with mirror auth errors are shown differe
|
| + command_id == IDC_UPGRADE_DIALOG; |
| } |
| base::string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const { |
| @@ -308,9 +307,6 @@ base::string16 WrenchMenuModel::GetLabelForCommandId(int command_id) const { |
| #endif |
| case IDC_UPGRADE_DIALOG: |
| return GetUpgradeDialogMenuItemName(); |
| - case IDC_SHOW_SIGNIN: |
| - return signin_ui_util::GetSigninMenuLabel( |
| - browser_->profile()->GetOriginalProfile()); |
| default: |
| NOTREACHED(); |
| return base::string16(); |
| @@ -330,18 +326,6 @@ bool WrenchMenuModel::GetIconForCommandId(int command_id, |
| } |
| return false; |
| } |
| - case IDC_SHOW_SIGNIN: { |
| - GlobalError* error = signin_ui_util::GetSignedInServiceError( |
| - browser_->profile()->GetOriginalProfile()); |
| - if (error) { |
| - int icon_id = error->MenuItemIconResourceID(); |
| - if (icon_id) { |
| - *icon = rb.GetNativeImageNamed(icon_id); |
| - return true; |
| - } |
| - } |
| - return false; |
| - } |
| default: |
| break; |
| } |
| @@ -356,16 +340,6 @@ void WrenchMenuModel::ExecuteCommand(int command_id, int event_flags) { |
| return; |
| } |
| - if (command_id == IDC_SHOW_SIGNIN) { |
| - // If a custom error message is being shown, handle it. |
| - GlobalError* error = signin_ui_util::GetSignedInServiceError( |
| - browser_->profile()->GetOriginalProfile()); |
| - if (error) { |
| - error->ExecuteMenuItem(browser_); |
| - return; |
| - } |
| - } |
| - |
| if (command_id == IDC_HELP_PAGE_VIA_MENU) |
| content::RecordAction(UserMetricsAction("ShowHelpTabViaWrenchMenu")); |
| @@ -578,19 +552,6 @@ void WrenchMenuModel::Build(bool is_new_menu) { |
| AddItemWithStringId(IDC_SHOW_DOWNLOADS, IDS_SHOW_DOWNLOADS); |
| AddSeparator(ui::NORMAL_SEPARATOR); |
| -#if !defined(OS_CHROMEOS) |
| - // No "Sign in to Chromium..." menu item on ChromeOS. |
| - SigninManager* signin = SigninManagerFactory::GetForProfile( |
| - browser_->profile()->GetOriginalProfile()); |
| - if (signin && signin->IsSigninAllowed()) { |
| - const base::string16 short_product_name = |
| - l10n_util::GetStringUTF16(IDS_SHORT_PRODUCT_NAME); |
| - AddItem(IDC_SHOW_SYNC_SETUP, l10n_util::GetStringFUTF16( |
| - IDS_SYNC_MENU_PRE_SYNCED_LABEL, short_product_name)); |
| - AddSeparator(ui::NORMAL_SEPARATOR); |
| - } |
| -#endif |
| - |
| AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS); |
| #if defined(OS_CHROMEOS) |
| @@ -658,11 +619,6 @@ void WrenchMenuModel::AddGlobalErrorMenuItems() { |
| // it won't show in the existing wrench menu. To fix this we need to some |
| // how update the menu if new errors are added. |
| ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| - // GetSignedInServiceErrors() can modify the global error list, so call it |
| - // before iterating through that list below. |
| - std::vector<GlobalError*> signin_errors = |
| - signin_ui_util::GetSignedInServiceErrors( |
| - browser_->profile()->GetOriginalProfile()); |
| const GlobalErrorService::GlobalErrorList& errors = |
| GlobalErrorServiceFactory::GetForProfile(browser_->profile())->errors(); |
| for (GlobalErrorService::GlobalErrorList::const_iterator |
| @@ -670,18 +626,6 @@ void WrenchMenuModel::AddGlobalErrorMenuItems() { |
| GlobalError* error = *it; |
| DCHECK(error); |
| if (error->HasMenuItem()) { |
| -#if !defined(OS_CHROMEOS) |
| - // Don't add a signin error if it's already being displayed elsewhere. |
| - if (std::find(signin_errors.begin(), signin_errors.end(), error) != |
| - signin_errors.end()) { |
| - MenuModel* model = this; |
| - int index = 0; |
| - if (MenuModel::GetModelAndIndexForCommandId( |
| - IDC_SHOW_SIGNIN, &model, &index)) { |
| - continue; |
| - } |
| - } |
| -#endif |
| AddItem(error->MenuItemCommandID(), error->MenuItemLabel()); |
| int icon_id = error->MenuItemIconResourceID(); |