| Index: ash/system/chromeos/session/logout_confirmation_dialog.cc
|
| diff --git a/ash/system/chromeos/session/logout_confirmation_dialog.cc b/ash/system/chromeos/session/logout_confirmation_dialog.cc
|
| index 80a71e84248a1dfda9e6b56a231dcaef55168f49..b43e5e6291f6f6dd062eb9dacc44c3b3c2f37b79 100644
|
| --- a/ash/system/chromeos/session/logout_confirmation_dialog.cc
|
| +++ b/ash/system/chromeos/session/logout_confirmation_dialog.cc
|
| @@ -62,6 +62,11 @@ void LogoutConfirmationDialog::Update(base::TimeTicks logout_time) {
|
| UpdateLabel();
|
| }
|
|
|
| +void LogoutConfirmationDialog::ControllerGone() {
|
| + controller_ = nullptr;
|
| + GetWidget()->Close();
|
| +}
|
| +
|
| bool LogoutConfirmationDialog::Accept() {
|
| logout_time_ = controller_->clock()->NowTicks();
|
| UpdateLabel();
|
| @@ -84,13 +89,10 @@ base::string16 LogoutConfirmationDialog::GetDialogButtonLabel(
|
| return views::DialogDelegateView::GetDialogButtonLabel(button);
|
| }
|
|
|
| -void LogoutConfirmationDialog::OnClosed() {
|
| +void LogoutConfirmationDialog::WindowClosing() {
|
| update_timer_.Stop();
|
| - controller_->OnDialogClosed();
|
| -}
|
| -
|
| -void LogoutConfirmationDialog::DeleteDelegate() {
|
| - delete this;
|
| + if (controller_)
|
| + controller_->OnDialogClosed();
|
| }
|
|
|
| void LogoutConfirmationDialog::UpdateLabel() {
|
|
|