OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromeos/login/auth/login_performer.h" | 5 #include "chromeos/login/auth/login_performer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 auth_mode))) { | 136 auth_mode))) { |
137 return; | 137 return; |
138 } | 138 } |
139 DoPerformLogin(user_context_, auth_mode); | 139 DoPerformLogin(user_context_, auth_mode); |
140 } | 140 } |
141 | 141 |
142 void LoginPerformer::DoPerformLogin(const UserContext& user_context, | 142 void LoginPerformer::DoPerformLogin(const UserContext& user_context, |
143 AuthorizationMode auth_mode) { | 143 AuthorizationMode auth_mode) { |
144 std::string email = gaia::CanonicalizeEmail(user_context.GetUserID()); | 144 std::string email = gaia::CanonicalizeEmail(user_context.GetUserID()); |
145 bool wildcard_match = false; | 145 bool wildcard_match = false; |
| 146 |
146 if (!IsUserWhitelisted(email, &wildcard_match)) { | 147 if (!IsUserWhitelisted(email, &wildcard_match)) { |
147 NotifyWhitelistCheckFailure(); | 148 NotifyWhitelistCheckFailure(); |
148 return; | 149 return; |
149 } | 150 } |
150 | 151 |
151 if (user_context.GetAuthFlow() == UserContext::AUTH_FLOW_EASY_UNLOCK) | 152 if (user_context.GetAuthFlow() == UserContext::AUTH_FLOW_EASY_UNLOCK) |
152 SetupEasyUnlockUserFlow(user_context.GetUserID()); | 153 SetupEasyUnlockUserFlow(user_context.GetUserID()); |
153 | 154 |
154 switch (auth_mode_) { | 155 switch (auth_mode_) { |
155 case AUTH_MODE_EXTENSION: { | 156 case AUTH_MODE_EXTENSION: { |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 } else { | 298 } else { |
298 NOTREACHED(); | 299 NOTREACHED(); |
299 } | 300 } |
300 user_context_.ClearSecrets(); | 301 user_context_.ClearSecrets(); |
301 } | 302 } |
302 | 303 |
303 void LoginPerformer::EnsureAuthenticator() { | 304 void LoginPerformer::EnsureAuthenticator() { |
304 authenticator_ = CreateAuthenticator(); | 305 authenticator_ = CreateAuthenticator(); |
305 } | 306 } |
306 } // namespace chromeos | 307 } // namespace chromeos |
OLD | NEW |