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

Unified Diff: chrome/browser/profiles/profile_manager.cc

Issue 10826044: Remove call to IsTryingToQuit from BrowserListImpl::SetLastActive (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comment Created 8 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/browser_list_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_manager.cc
diff --git a/chrome/browser/profiles/profile_manager.cc b/chrome/browser/profiles/profile_manager.cc
index af82b91d099118b7ebee489a30357e7d602f0dc8..6ed922ec7d0cd9f93e525f80976eae7f409880b3 100644
--- a/chrome/browser/profiles/profile_manager.cc
+++ b/chrome/browser/profiles/profile_manager.cc
@@ -639,6 +639,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);
« no previous file with comments | « no previous file | chrome/browser/ui/browser_list_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698