| Index: chrome/browser/ui/views/external_protocol_dialog.cc
|
| diff --git a/chrome/browser/ui/views/external_protocol_dialog.cc b/chrome/browser/ui/views/external_protocol_dialog.cc
|
| index 60b15cfe11a6d74359538c3ba7d8d6f4818a6058..1cfc6c81bc2e221940b17399f9486d9d55ab15a2 100644
|
| --- a/chrome/browser/ui/views/external_protocol_dialog.cc
|
| +++ b/chrome/browser/ui/views/external_protocol_dialog.cc
|
| @@ -74,10 +74,6 @@ void ExternalProtocolDialog::DeleteDelegate() {
|
| }
|
|
|
| bool ExternalProtocolDialog::Cancel() {
|
| - // We also get called back here if the user closes the dialog or presses
|
| - // escape. In these cases it would be preferable to ignore the state of the
|
| - // check box but MessageBox doesn't distinguish this from pressing the cancel
|
| - // button.
|
| delegate_->DoCancel(delegate_->url(),
|
| message_box_view_->IsCheckBoxSelected());
|
|
|
| @@ -105,6 +101,15 @@ bool ExternalProtocolDialog::Accept() {
|
| return true;
|
| }
|
|
|
| +bool ExternalProtocolDialog::Close() {
|
| + // If the user dismisses the dialog without interacting with the buttons (e.g.
|
| + // via pressing Esc or the X), act as though they cancelled the request, but
|
| + // ignore the checkbox state. This ensures that if they check the checkbox but
|
| + // dismiss the dialog, we don't stop prompting them forever.
|
| + delegate_->DoCancel(delegate_->url(), false);
|
| + return true;
|
| +}
|
| +
|
| views::View* ExternalProtocolDialog::GetContentsView() {
|
| return message_box_view_;
|
| }
|
|
|