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 2dd89a89c68443e1e5bb435dd9c402bce566e435..87cc43418926bbab43f7178f26b5ee7632c0eb09 100644 |
--- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc |
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc |
@@ -19,8 +19,6 @@ TabModalConfirmDialogDelegate::TabModalConfirmDialogDelegate( |
: close_delegate_(NULL), |
closing_(false) { |
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)); |
} |
@@ -58,10 +56,8 @@ void TabModalConfirmDialogDelegate::Observe( |
int type, |
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 the dialog if the tab is closed. |
+ if (type == chrome::NOTIFICATION_TAB_CLOSING) { |
Cancel(); |
} else { |
NOTREACHED(); |