Index: chrome/browser/ui/unload_controller.cc |
diff --git a/chrome/browser/ui/unload_controller.cc b/chrome/browser/ui/unload_controller.cc |
index 19d61540a760ae4b3e23d49db68ebd3de73ce377..010b2877b9dd6be228ac7b75ec8ab001347cd15e 100644 |
--- a/chrome/browser/ui/unload_controller.cc |
+++ b/chrome/browser/ui/unload_controller.cc |
@@ -162,7 +162,8 @@ void UnloadController::TabInsertedAt(content::WebContents* contents, |
} |
void UnloadController::TabDetachedAt(content::WebContents* contents, |
- int index) { |
+ int index, |
+ bool closing_all) { |
TabDetachedImpl(contents); |
} |
@@ -221,9 +222,10 @@ bool UnloadController::DetachWebContents(content::WebContents* contents) { |
if (index != TabStripModel::kNoTab && |
contents->NeedToFireBeforeUnload()) { |
tabs_needing_unload_ack_.insert(contents); |
+ CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(contents); |
+ core_tab_helper->OnUnloadAboutToDetach(); |
browser_->tab_strip_model()->DetachWebContentsAt(index); |
contents->SetDelegate(detached_delegate_.get()); |
- CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(contents); |
core_tab_helper->OnUnloadDetachedStarted(); |
return true; |
} |