Index: trunk/src/chrome/browser/ui/views/frame/browser_view.cc |
=================================================================== |
--- trunk/src/chrome/browser/ui/views/frame/browser_view.cc (revision 195133) |
+++ trunk/src/chrome/browser/ui/views/frame/browser_view.cc (working copy) |
@@ -1849,16 +1849,12 @@ |
return false; |
if (!browser_->tab_strip_model()->empty()) { |
+ // Tab strip isn't empty. Hide the frame (so it appears to have closed |
+ // immediately) and close all the tabs, allowing the renderers to shut |
+ // down. When the tab strip is empty we'll be called back again. |
frame_->Hide(); |
browser_->OnWindowClosing(); |
- browser_->tab_strip_model()->CloseAllTabs(); |
return false; |
- } else if (!browser_->HasCompletedUnloadProcessing()) { |
- // The browser needs to finish running unload handlers. |
- // Hide the window (so it appears to have closed immediately), and |
- // the browser will call us back again when it is ready to close. |
- frame_->Hide(); |
- return false; |
} |
// Empty TabStripModel, it's now safe to allow the Window to be closed. |