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..6cb1da98601bf701d006e4d902fc01927037d242 100644 |
--- a/chrome/browser/profiles/profile_manager.cc |
+++ b/chrome/browser/profiles/profile_manager.cc |
@@ -561,8 +561,13 @@ void ProfileManager::Observe( |
DCHECK(profile); |
if (!profile->IsOffTheRecord() && ++browser_counts_[profile] == 1) { |
active_profiles_.push_back(profile); |
- save_active_profiles = !closing_all_browsers_; |
+ save_active_profiles = true; |
} |
+ // If browsers are opening, we can't be closing all the browsers. This |
+ // can happen if the application was exited, but background mode or |
+ // packaged apps prevented the process from shutting down, and then |
+ // a new browser window was opened. |
+ closing_all_browsers_ = false; |
break; |
} |
case chrome::NOTIFICATION_BROWSER_CLOSED: { |