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

Unified Diff: chrome/browser/chromeos/login/session/chrome_session_manager.cc

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase Created 3 years, 9 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/chromeos/login/session/chrome_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/chrome_session_manager.cc b/chrome/browser/chromeos/login/session/chrome_session_manager.cc
index a08df7b0e095d043421daec63919c80346e5e1d7..815022d5b728e90ed1fa2e8b71fe0c80ff54d353 100644
--- a/chrome/browser/chromeos/login/session/chrome_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/chrome_session_manager.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/ash/ash_util.h"
+#include "chrome/browser/ui/ash/session_controller_client.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chromeos/audio/cras_audio_handler.h"
@@ -134,6 +135,11 @@ void StartRestoreAfterCrashSession(Profile* user_profile,
// restore Sync.
UserSessionManager::GetInstance()->RestoreAuthenticationSession(
user_profile);
+ } else {
+ // Ensure that initial session state reaches ash during test. Otherwise,
+ // browser window would be created without focus because ash thinks the
+ // user session is blocked.
+ SessionControllerClient::FlushForTesting();
James Cook 2017/03/17 17:14:36 Hrm. Do we have to do this? I remember we added t
xiyuan 2017/03/17 22:52:03 It is not just one focus test. There are about 18
James Cook 2017/03/18 18:40:06 Could we do something like have ash look for the -
xiyuan 2017/03/19 08:48:33 Yep, sounds good.
Ken Rockot(use gerrit already) 2017/03/20 15:59:26 Sounds like my answer doesn't matter anymore, but
}
}

Powered by Google App Engine
This is Rietveld 408576698