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

Unified Diff: chromeos/login/auth/login_performer.cc

Issue 681753002: Avoid possible recursion during supervised user sign in (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years, 2 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 | « chromeos/login/auth/login_performer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/login/auth/login_performer.cc
diff --git a/chromeos/login/auth/login_performer.cc b/chromeos/login/auth/login_performer.cc
index 960a69edc47fe57016d179b53762f5c672fc433f..5c8bbdff258f55165a15bd3074581eb374a7c42b 100644
--- a/chromeos/login/auth/login_performer.cc
+++ b/chromeos/login/auth/login_performer.cc
@@ -142,7 +142,7 @@ void LoginPerformer::PerformLogin(const UserContext& user_context,
auth_mode))) {
return;
}
- DoPerformLogin(user_context, auth_mode);
+ DoPerformLogin(user_context_, auth_mode);
}
void LoginPerformer::DoPerformLogin(const UserContext& user_context,
@@ -178,12 +178,18 @@ void LoginPerformer::LoginAsSupervisedUser(const UserContext& user_context) {
DCHECK_EQ(chromeos::login::kSupervisedUserDomain,
gaia::ExtractDomainName(user_context.GetUserID()));
- if (RunTrustedCheck(base::Bind(&LoginPerformer::LoginAsSupervisedUser,
+ user_context_ = user_context;
+
+ if (RunTrustedCheck(base::Bind(&LoginPerformer::TrustedLoginAsSupervisedUser,
weak_factory_.GetWeakPtr(),
user_context_))) {
return;
}
+ TrustedLoginAsSupervisedUser(user_context_);
+}
+void LoginPerformer::TrustedLoginAsSupervisedUser(
+ const UserContext& user_context) {
if (!AreSupervisedUsersAllowed()) {
LOG(ERROR) << "Login attempt of supervised user detected.";
delegate_->WhiteListCheckFailed(user_context.GetUserID());
« no previous file with comments | « chromeos/login/auth/login_performer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698