| Index: chrome/browser/ui/views/infobars/confirm_infobar.cc
|
| diff --git a/chrome/browser/ui/views/infobars/confirm_infobar.cc b/chrome/browser/ui/views/infobars/confirm_infobar.cc
|
| index 415afcdff05ca5d212abb221c0cbd26e6d21502f..06475b74579a9dffaf1827c92555bc7910d53bdb 100644
|
| --- a/chrome/browser/ui/views/infobars/confirm_infobar.cc
|
| +++ b/chrome/browser/ui/views/infobars/confirm_infobar.cc
|
| @@ -69,18 +69,24 @@ void ConfirmInfoBar::ViewHierarchyChanged(
|
| AddChildView(label_);
|
|
|
| if (delegate->GetButtons() & ConfirmInfoBarDelegate::BUTTON_OK) {
|
| - ok_button_ = CreateLabelButton(
|
| - this, delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_OK));
|
| - if (delegate->OKButtonTriggersUACPrompt())
|
| + if (delegate->OKButtonTriggersUACPrompt()) {
|
| + // Use a label button even in MD mode as MD buttons don't support icons.
|
| + views::LabelButton* ok_button = CreateLabelButton(
|
| + this, delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_OK));
|
| elevation_icon_setter_.reset(new ElevationIconSetter(
|
| - ok_button_,
|
| + ok_button,
|
| base::Bind(&ConfirmInfoBar::Layout, base::Unretained(this))));
|
| + ok_button_ = ok_button;
|
| + } else {
|
| + ok_button_ = CreateTextButton(
|
| + this, delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_OK));
|
| + }
|
| AddChildView(ok_button_);
|
| ok_button_->SizeToPreferredSize();
|
| }
|
|
|
| if (delegate->GetButtons() & ConfirmInfoBarDelegate::BUTTON_CANCEL) {
|
| - cancel_button_ = CreateLabelButton(
|
| + cancel_button_ = CreateTextButton(
|
| this,
|
| delegate->GetButtonLabel(ConfirmInfoBarDelegate::BUTTON_CANCEL));
|
| AddChildView(cancel_button_);
|
|
|