Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3024)

Unified Diff: chrome/browser/tabs/tab_strip_model.cc

Issue 274057: Add histogram for how tab closing time. Did some cleanup along the way. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tabs/tab_strip_model.cc
===================================================================
--- chrome/browser/tabs/tab_strip_model.cc (revision 28997)
+++ chrome/browser/tabs/tab_strip_model.cc (working copy)
@@ -644,6 +644,7 @@
// 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 @@
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
TabClosingAt(detached_contents, indices[i]));
- if (detached_contents) {
tony 2009/10/14 23:20:06 Maybe we should DCHECK |detached_contents| above?
jam 2009/10/14 23:31:11 I took it out because delegate_->RunUnloadListener
- // 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;

Powered by Google App Engine
This is Rietveld 408576698