| Index: chrome/browser/ui/views/simple_message_box_views.cc
|
| diff --git a/chrome/browser/ui/views/simple_message_box_views.cc b/chrome/browser/ui/views/simple_message_box_views.cc
|
| index 6d9c1002fc1dfa1eacd9104fedca2f76c3c5c0e4..251c8fcf56ec0ef544267666ea40e1163d01b869 100644
|
| --- a/chrome/browser/ui/views/simple_message_box_views.cc
|
| +++ b/chrome/browser/ui/views/simple_message_box_views.cc
|
| @@ -86,10 +86,14 @@ bool SimpleMessageBoxViews::Accept() {
|
| int SimpleMessageBoxViews::GetDialogButtons() const {
|
| // NOTE: It seems unsafe to assume that the flags for OK/cancel will always
|
| // have the same value as the button ids.
|
| - return (dialog_flags_ & ui::MessageBoxFlags::kFlagHasOKButton
|
| - ? ui::DIALOG_BUTTON_OK : 0) |
|
| - (dialog_flags_ & ui::MessageBoxFlags::kFlagHasCancelButton
|
| - ? ui::DIALOG_BUTTON_CANCEL : 0);
|
| + int dialog_buttons = ui::DIALOG_BUTTON_NONE;
|
| + if (dialog_flags_ & ui::MessageBoxFlags::kFlagHasOKButton)
|
| + dialog_buttons = ui::DIALOG_BUTTON_OK;
|
| +
|
| + if (dialog_flags_ & ui::MessageBoxFlags::kFlagHasCancelButton)
|
| + dialog_buttons |= ui::DIALOG_BUTTON_CANCEL;
|
| +
|
| + return dialog_buttons;
|
| }
|
|
|
| string16 SimpleMessageBoxViews::GetDialogButtonLabel(
|
|
|