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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 NotifyWhitelistCheckFailure(); | 150 NotifyWhitelistCheckFailure(); |
151 return; | 151 return; |
152 } | 152 } |
153 | 153 |
154 if (user_context.GetAuthFlow() == UserContext::AUTH_FLOW_EASY_UNLOCK) | 154 if (user_context.GetAuthFlow() == UserContext::AUTH_FLOW_EASY_UNLOCK) |
155 SetupEasyUnlockUserFlow(user_context.GetUserID()); | 155 SetupEasyUnlockUserFlow(user_context.GetUserID()); |
156 | 156 |
157 switch (auth_mode_) { | 157 switch (auth_mode_) { |
158 case AUTH_MODE_EXTENSION: { | 158 case AUTH_MODE_EXTENSION: { |
159 RunOnlineWhitelistCheck( | 159 RunOnlineWhitelistCheck( |
160 email, | 160 email, wildcard_match, user_context.GetRefreshToken(), |
161 wildcard_match, | |
162 base::Bind(&LoginPerformer::StartLoginCompletion, | 161 base::Bind(&LoginPerformer::StartLoginCompletion, |
163 weak_factory_.GetWeakPtr()), | 162 weak_factory_.GetWeakPtr()), |
164 base::Bind(&LoginPerformer::NotifyWhitelistCheckFailure, | 163 base::Bind(&LoginPerformer::NotifyWhitelistCheckFailure, |
165 weak_factory_.GetWeakPtr())); | 164 weak_factory_.GetWeakPtr())); |
166 break; | 165 break; |
167 } | 166 } |
168 case AUTH_MODE_INTERNAL: | 167 case AUTH_MODE_INTERNAL: |
169 StartAuthentication(); | 168 StartAuthentication(); |
170 break; | 169 break; |
171 } | 170 } |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 } else { | 302 } else { |
304 NOTREACHED(); | 303 NOTREACHED(); |
305 } | 304 } |
306 user_context_.ClearSecrets(); | 305 user_context_.ClearSecrets(); |
307 } | 306 } |
308 | 307 |
309 void LoginPerformer::EnsureAuthenticator() { | 308 void LoginPerformer::EnsureAuthenticator() { |
310 authenticator_ = CreateAuthenticator(); | 309 authenticator_ = CreateAuthenticator(); |
311 } | 310 } |
312 } // namespace chromeos | 311 } // namespace chromeos |
OLD | NEW |