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

Unified Diff: chrome/browser/sessions/session_service.cc

Issue 362016: Mac: don't restore explicitly closed windows. (Closed)
Patch Set: Updated comment per sky's re-review. Created 11 years, 1 month 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 | « chrome/browser/sessions/session_service.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_service.cc
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 6b9bd65936a0d9eb421a36e52f2d627a4a19625e..8b2575d75d98b820d51f1ec830d272a3aefff03d 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -238,7 +238,7 @@ void SessionService::WindowClosing(const SessionID& window_id) {
// false to true, so only update it if already true.
has_open_trackable_browsers_ = HasOpenTrackableBrowsers(window_id);
}
- if (!has_open_trackable_browsers_)
+ if (should_record_close_as_pending())
pending_window_close_ids_.insert(window_id.id());
else
window_closing_ids_.insert(window_id.id());
@@ -257,7 +257,7 @@ void SessionService::WindowClosed(const SessionID& window_id) {
pending_window_close_ids_.end()) {
// We'll hit this if user closed the last tab in a window.
has_open_trackable_browsers_ = HasOpenTrackableBrowsers(window_id);
- if (!has_open_trackable_browsers_)
+ if (should_record_close_as_pending())
pending_window_close_ids_.insert(window_id.id());
else
ScheduleCommand(CreateWindowClosedCommand(window_id.id()));
« no previous file with comments | « chrome/browser/sessions/session_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698