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

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

Issue 2903123002: cros: Terminate if merge session fails for online sign-in (Closed)
Patch Set: add test Created 3 years, 7 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/user_session_manager.cc
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 598c694798e4635a12843bd8438e10552d6dfa95..467db4df9f7fe789279b1f758c9c4638e1f7010c 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -867,6 +867,16 @@ void UserSessionManager::OnSessionRestoreStateChanged(
login_manager->RemoveObserver(this);
+ const bool is_online_signin =
achuithb 2017/05/25 19:44:17 I think a comment explaining that this is necessar
xiyuan 2017/05/25 20:24:09 Done.
+ user_context_.GetAuthFlow() == UserContext::AUTH_FLOW_GAIA_WITH_SAML ||
+ user_context_.GetAuthFlow() == UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML;
+ if (is_online_signin && state == OAuth2LoginManager::SESSION_RESTORE_FAILED) {
+ LOG(ERROR)
+ << "Session restore failed for online sign-in, terminating session.";
+ chrome::AttemptUserExit();
+ return;
+ }
+
if (exit_after_session_restore_ &&
(state == OAuth2LoginManager::SESSION_RESTORE_DONE ||
state == OAuth2LoginManager::SESSION_RESTORE_FAILED ||

Powered by Google App Engine
This is Rietveld 408576698