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..d83c99d85cef2f6163b04fa229b8f6887b233cce 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_EQ(content::NOTIFICATION_LOAD_START, type); |
+ |
+ Close(); |
} |
void TabModalConfirmDialogDelegate::Close() { |