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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc

Issue 1053013007: Minimized windows should not be activated by another user in multiprofile scenario. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the system crash when add another user into chromeos system. Created 5 years, 8 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
Index: chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
index e2204523a5ceae03868b8a5c23299be8945e58ec..840289d8fc2ab98a6f201aa308c12da61d23b3b9 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate_chromeos.cc
@@ -42,7 +42,10 @@
namespace {
-void InitAfterSessionStart() {
+void InitAfterSessionStart(bool is_first_run) {
Mr4D (OOO till 08-26) 2015/04/14 20:06:55 You can remove this.
+ if (!is_first_run)
+ return;
+
// Restore focus after the user session is started. It's needed because some
// windows can be opened in background while login UI is still active because
// we currently restore browser windows before login UI is deleted.
@@ -263,7 +266,8 @@ void ChromeShellDelegate::Observe(int type,
break;
}
case chrome::NOTIFICATION_SESSION_STARTED:
Mr4D (OOO till 08-26) 2015/04/14 20:06:55 Do not call this function in the first place when
- InitAfterSessionStart();
+ InitAfterSessionStart(is_first_run_);
Mr4D (OOO till 08-26) 2015/04/14 20:06:55 You don't even need is_first_run_ by using:
+ is_first_run_ = false;
ash::Shell::GetInstance()->ShowShelf();
break;
default:

Powered by Google App Engine
This is Rietveld 408576698