summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/browser_command_controller.cc
diff options
context:
space:
mode:
authorsammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-16 05:45:56 +0000
committersammc@chromium.org <sammc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-16 05:45:56 +0000
commit2e9d79f5f464c68f5f5d957fa32ffc2c72ef3881 (patch)
tree31c76e43c68306b0035cd1d13433b322b12f458d /chrome/browser/ui/browser_command_controller.cc
parent1e7ed9716c2c13cd2d74a62879370d0d8cd6dc84 (diff)
downloadchromium_src-2e9d79f5f464c68f5f5d957fa32ffc2c72ef3881.zip
chromium_src-2e9d79f5f464c68f5f5d957fa32ffc2c72ef3881.tar.gz
chromium_src-2e9d79f5f464c68f5f5d957fa32ffc2c72ef3881.tar.bz2
Don't close tabs at shutdown until all beforeunload handlers have run.
Previously, when Chrome shuts down, each window independently runs its beforeunload handlers and aborts closing if the user decides to stay on the current page; there is no communication between windows and only windows containing tabs that the user chose to keep open remain open. The session manager is disabled when the shutdown begins so any tabs opened after shutdown is aborted won't be noticed by the session manager. With this change, all beforeunload handlers across all windows are run before any windows start closing, so the browser will return to its pre-shutdown state if a shutdown is aborted due to a beforeunload dialog. BUG=265764 Review URL: https://chromiumcodereview.appspot.com/21143003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_command_controller.cc')
-rw-r--r--chrome/browser/ui/browser_command_controller.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 04b90fb..4300e86 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/defaults.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/prefs/incognito_mode_prefs.h"
#include "chrome/browser/profiles/avatar_menu_model.h"
#include "chrome/browser/profiles/profile.h"