Chromium Code Reviews| Index: chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc |
| diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc |
| index 9e49df0d9902af42519eb53bab25b59cef60813e..0d9513712aaae7053f38cea860f398f51a980504 100644 |
| --- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc |
| +++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc |
| @@ -21,8 +21,6 @@ TabModalConfirmDialogDelegate::TabModalConfirmDialogDelegate( |
| NavigationController* controller = &web_contents->GetController(); |
| registrar_.Add(this, content::NOTIFICATION_LOAD_START, |
| content::Source<NavigationController>(controller)); |
| - registrar_.Add(this, chrome::NOTIFICATION_TAB_CLOSING, |
| - content::Source<NavigationController>(controller)); |
| } |
| TabModalConfirmDialogDelegate::~TabModalConfirmDialogDelegate() { |
| @@ -66,13 +64,10 @@ void TabModalConfirmDialogDelegate::Observe( |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) { |
| // Close the dialog if we load a page (because the action might not apply to |
| - // the same page anymore) or if the tab is closed. |
| - if (type == content::NOTIFICATION_LOAD_START || |
| - type == chrome::NOTIFICATION_TAB_CLOSING) { |
| - Close(); |
| - } else { |
| - NOTREACHED(); |
| - } |
| + // the same page anymore). |
| + DCHECK(type == content::NOTIFICATION_LOAD_START); |
|
sky
2013/09/04 14:12:51
DCHECK_EQ
Mike Wittman
2013/09/04 16:59:28
Done.
|
| + |
| + Close(); |
| } |
| void TabModalConfirmDialogDelegate::Close() { |