diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-09 05:22:38 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-09 05:22:38 +0000 |
commit | c2c7f582ed00988a5a5fd79de0a35160d9828b6e (patch) | |
tree | 28165af485d11d920bde2e9e19e94584853f84fc /chrome | |
parent | 0f7cd86551b39c48944b24ccefdf215af20710d3 (diff) | |
download | chromium_src-c2c7f582ed00988a5a5fd79de0a35160d9828b6e.zip chromium_src-c2c7f582ed00988a5a5fd79de0a35160d9828b6e.tar.gz chromium_src-c2c7f582ed00988a5a5fd79de0a35160d9828b6e.tar.bz2 |
Remove call to IsTryingToQuit from BrowserListImpl::SetLastActive
Instead the profile manager watches notifications to determine this.
BUG=130456
Review URL: https://chromiumcodereview.appspot.com/10826044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@150743 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/profiles/profile_manager.cc | 7 | ||||
-rw-r--r-- | chrome/browser/ui/browser_list_impl.cc | 5 |
2 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc index 57c5c0a..f395cee 100644 --- a/chrome/browser/profiles/profile_manager.cc +++ b/chrome/browser/profiles/profile_manager.cc @@ -656,6 +656,13 @@ void ProfileManager::BrowserListObserver::OnBrowserRemoved( void ProfileManager::BrowserListObserver::OnBrowserSetLastActive( Browser* browser) { + // If all browsers are being closed (e.g. the user is in the process of + // shutting down), this event will be fired after each browser is + // closed. This does not represent a user intention to change the active + // browser so is not handled here. + if (profile_manager_->closing_all_browsers_) + return; + Profile* last_active = browser->profile(); PrefService* local_state = g_browser_process->local_state(); DCHECK(local_state); diff --git a/chrome/browser/ui/browser_list_impl.cc b/chrome/browser/ui/browser_list_impl.cc index 50393d1..178f408 100644 --- a/chrome/browser/ui/browser_list_impl.cc +++ b/chrome/browser/ui/browser_list_impl.cc @@ -105,11 +105,6 @@ void BrowserListImpl::RemoveObserver(BrowserListObserver* observer) { } void BrowserListImpl::SetLastActive(Browser* browser) { - // If the browser is currently trying to quit, we don't want to set the last - // active browser because that can alter the last active browser that the user - // intended depending on the order in which the windows close. - if (browser_shutdown::IsTryingToQuit()) - return; RemoveBrowserFrom(browser, &last_active_browsers_); last_active_browsers_.push_back(browser); |