diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 23:32:01 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 23:32:01 +0000 |
commit | 7ab1e7d655b5207df4d23f046ca6a927da9df007 (patch) | |
tree | f3da143df1d41e42b907972fb791388bbf48a904 /chrome/browser/tabs | |
parent | 8238c3e56dd70357c72e1a78100e06d0bfcdedc4 (diff) | |
download | chromium_src-7ab1e7d655b5207df4d23f046ca6a927da9df007.zip chromium_src-7ab1e7d655b5207df4d23f046ca6a927da9df007.tar.gz chromium_src-7ab1e7d655b5207df4d23f046ca6a927da9df007.tar.bz2 |
Add histogram for how tab closing time. Did some cleanup along the way. Moved the is_showing_before_unload_dialog_ stuff from RenderViewHost to TabContents since we need that bit there as well.
Review URL: http://codereview.chromium.org/274057
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29063 0039d316-1c4b-4281-b951-d872f2087c98
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; |