Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1612)

Unified Diff: ash/system/chromeos/session/logout_confirmation_dialog.cc

Issue 1729723003: Reland: Remove DialogDelegate::OnClosed() which is redundant with (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: with fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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() {
« no previous file with comments | « ash/system/chromeos/session/logout_confirmation_dialog.h ('k') | chrome/browser/chromeos/enrollment_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698