diff options
author | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-30 08:56:32 +0000 |
---|---|---|
committer | tapted@chromium.org <tapted@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-30 08:56:32 +0000 |
commit | 46482700d359a0cf3d9fc7731cbc39834588e3e9 (patch) | |
tree | 7de1a5f15ac35ece459a137cd65558c1e48b71cb | |
parent | 3aaa5b05660a7ecbb49c626bb69731ac180a478c (diff) | |
download | chromium_src-46482700d359a0cf3d9fc7731cbc39834588e3e9.zip chromium_src-46482700d359a0cf3d9fc7731cbc39834588e3e9.tar.gz chromium_src-46482700d359a0cf3d9fc7731cbc39834588e3e9.tar.bz2 |
Ensure the Desktop App Launcher warmup window is not created while trying to quit.
When relaunching from Metro there is a lengthier time-window where
BrowserProcess::IsShuttingDown() is false, but
browser_shutdown::IsTryingToQuit() is true. If the app launcher delayed
warmup (and the non-delayed asynchronous profile load it triggers) is
unlucky enough to get scheduled here, then it can create a window after
Widget::CloseAllSecondaryWidgets() has been called on the shutdown path,
which otherwise would have mopped up the app launcher resources.
Checking browser_shutdown::IsTryingToQuit ensures the app launcher
window won't be created after Widget::CloseAllSecondaryWidgets() would
have been called during shutdown.
BUG=333350
Review URL: https://codereview.chromium.org/149323002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@247906 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/views/app_list/win/app_list_service_win.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/ui/views/app_list/win/app_list_service_win.cc b/chrome/browser/ui/views/app_list/win/app_list_service_win.cc index b171f66..79daa07 100644 --- a/chrome/browser/ui/views/app_list/win/app_list_service_win.cc +++ b/chrome/browser/ui/views/app_list/win/app_list_service_win.cc @@ -23,6 +23,7 @@ #include "base/win/windows_version.h" #include "chrome/app/chrome_dll_resource.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/browser_shutdown.h" #include "chrome/browser/platform_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_manager.h" @@ -507,8 +508,10 @@ void AppListServiceWin::ScheduleWarmup() { } bool AppListServiceWin::IsWarmupNeeded() { - if (!g_browser_process || g_browser_process->IsShuttingDown()) + if (!g_browser_process || g_browser_process->IsShuttingDown() || + browser_shutdown::IsTryingToQuit()) { return false; + } // We only need to initialize the view if there's no view already created and // there's no profile loading to be shown. |