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

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

Issue 2714483003: cros: Fix restoring session windows after crash inconsistent minimized window counts (Closed)
Patch Set: based on ps1's comments Created 3 years, 10 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/sessions/session_restore_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index eeafc2d4fed5bd8ac73abeea509a04cf4f662b5f..b329a94500549d93526455c7b34e76acb5029c6d 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -410,6 +410,10 @@ class SessionRestoreImpl : public content::NotificationObserver {
!browser_->profile()->IsOffTheRecord()) {
// The first set of tabs is added to the existing browser.
browser = browser_;
+ // If the first set of tabs belongs to minimized browser, the existing
+ // browser should be minimized to keep consistent show state.
+ if ((*i)->show_state == ui::SHOW_STATE_MINIMIZED)
sky 2017/02/23 21:41:06 If there is only one window, I think we should not
Qiang(Joe) Xu 2017/03/06 22:36:03 Yes, I agree. We shall not minimize here. Another
+ browser->window()->Minimize();
} else {
#if defined(OS_CHROMEOS)
chromeos::BootTimesRecorder::Get()->AddLoginTimeMarker(
« no previous file with comments | « no previous file | chrome/browser/sessions/session_restore_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698