diff options
Diffstat (limited to 'chrome/browser/tabs')
-rw-r--r-- | chrome/browser/tabs/tab_strip_model.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc index b1f4bd6..fddeed7 100644 --- a/chrome/browser/tabs/tab_strip_model.cc +++ b/chrome/browser/tabs/tab_strip_model.cc @@ -644,6 +644,7 @@ bool TabStripModel::InternalCloseTabs(std::vector<int> indices, // We now return to our regularly scheduled shutdown procedure. for (size_t i = 0; i < indices.size(); ++i) { TabContents* detached_contents = GetContentsAt(indices[i]); + detached_contents->OnCloseStarted(); if (!delegate_->CanCloseContentsAt(indices[i]) || delegate_->RunUnloadListenerBeforeClosing(detached_contents)) { @@ -654,16 +655,14 @@ bool TabStripModel::InternalCloseTabs(std::vector<int> indices, FOR_EACH_OBSERVER(TabStripModelObserver, observers_, TabClosingAt(detached_contents, indices[i])); - if (detached_contents) { - // Ask the delegate to save an entry for this tab in the historical tab - // database if applicable. - if (create_historical_tabs) - delegate_->CreateHistoricalTab(detached_contents); + // Ask the delegate to save an entry for this tab in the historical tab + // database if applicable. + if (create_historical_tabs) + delegate_->CreateHistoricalTab(detached_contents); - // Deleting the TabContents will call back to us via NotificationObserver - // and detach it. - delete detached_contents; - } + // Deleting the TabContents will call back to us via NotificationObserver + // and detach it. + delete detached_contents; } return retval; |