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

Unified Diff: chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc

Issue 1412813003: This CL replaces user_manager::UserID with AccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@468875--Chrome-OS-handles-deletion-of-Gmail-account-poorly--Create-AccountID-structure-part2--user_names
Patch Set: Fix Win GN build. Created 5 years, 1 month 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/saml/saml_offline_signin_limiter.cc
diff --git a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc
index 826aa1c6b220dd693eafd5f6616665b95b2d4be5..ede2bee6bcb63747a311736b98c6401c18c97524 100644
--- a/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc
+++ b/chrome/browser/chromeos/login/saml/saml_offline_signin_limiter.cc
@@ -45,14 +45,14 @@ void SAMLOfflineSigninLimiter::SignedIn(UserContext::AuthFlow auth_flow) {
NOTREACHED();
return;
}
- const std::string& user_id = user->email();
+ const AccountId account_id = user->GetAccountId();
if (auth_flow == UserContext::AUTH_FLOW_GAIA_WITHOUT_SAML) {
// The user went through online authentication and GAIA did not redirect to
// a SAML IdP. No limit applies in this case. Clear the time of last login
// with SAML and the flag enforcing online login, then return.
prefs->ClearPref(prefs::kSAMLLastGAIASignInTime);
- user_manager::UserManager::Get()->SaveForceOnlineSignin(user_id, false);
+ user_manager::UserManager::Get()->SaveForceOnlineSignin(account_id, false);
return;
}
@@ -62,7 +62,7 @@ void SAMLOfflineSigninLimiter::SignedIn(UserContext::AuthFlow auth_flow) {
// enforcing online login. The flag will be set again when the limit
// expires. If the limit already expired (e.g. because it was set to zero),
// the flag will be set again immediately.
- user_manager::UserManager::Get()->SaveForceOnlineSignin(user_id, false);
+ user_manager::UserManager::Get()->SaveForceOnlineSignin(account_id, false);
prefs->SetInt64(prefs::kSAMLLastGAIASignInTime,
clock_->Now().ToInternalValue());
}
@@ -143,8 +143,9 @@ void SAMLOfflineSigninLimiter::ForceOnlineLogin() {
return;
}
- user_manager::UserManager::Get()->SaveForceOnlineSignin(user->email(), true);
- RecordReauthReason(user->email(), ReauthReason::SAML_REAUTH_POLICY);
+ user_manager::UserManager::Get()->SaveForceOnlineSignin(user->GetAccountId(),
+ true);
+ RecordReauthReason(user->GetAccountId(), ReauthReason::SAML_REAUTH_POLICY);
offline_signin_limit_timer_.reset();
}

Powered by Google App Engine
This is Rietveld 408576698