summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sessions/session_service.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/sessions/session_service.cc')
-rw-r--r--chrome/browser/sessions/session_service.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 6b9bd65..8b2575d 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()));