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

Unified Diff: chrome/browser/chromeos/login/screens/user_selection_screen.cc

Issue 2711113003: Track whether a given user session has completed initialization, and use (Closed)
Patch Set: Only expose known_user::RemovePrefsForTesting() for tests 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/users/fake_chrome_user_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/screens/user_selection_screen.cc
diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.cc b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
index 39eb49bdb6308cc72d4aa8d4f165b5035db356db..cb42359020fa1f829e70b4f1f3059921e98746e0 100644
--- a/chrome/browser/chromeos/login/screens/user_selection_screen.cc
+++ b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
@@ -277,7 +277,11 @@ bool UserSelectionScreen::ShouldForceOnlineSignIn(
if (token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID)
RecordReauthReason(user->GetAccountId(), ReauthReason::OTHER);
- return user->force_online_signin() ||
+ // We need to force an online signin if the user is marked as requiring it,
+ // or if the user's session never completed initialization (still need to
+ // check for policy/management state) or if there's an invalid OAUTH token
+ // that needs to be refreshed.
+ return user->force_online_signin() || !user->profile_ever_initialized() ||
(token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) ||
(token_status == user_manager::User::OAUTH_TOKEN_STATUS_UNKNOWN);
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/users/fake_chrome_user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698