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 "chrome/browser/chromeos/login/supervised/supervised_user_authenticator .h" | 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticator .h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "chrome/browser/chromeos/boot_times_loader.h" | 10 #include "chrome/browser/chromeos/boot_times_loader.h" |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
256 state = ResolveCryptohomeFailureState(); | 256 state = ResolveCryptohomeFailureState(); |
257 | 257 |
258 DCHECK(current_state_->cryptohome_complete()); | 258 DCHECK(current_state_->cryptohome_complete()); |
259 DCHECK(current_state_->hash_obtained() || current_state_->add_key); | 259 DCHECK(current_state_->hash_obtained() || current_state_->add_key); |
260 return state; | 260 return state; |
261 } | 261 } |
262 | 262 |
263 SupervisedUserAuthenticator::AuthState | 263 SupervisedUserAuthenticator::AuthState |
264 SupervisedUserAuthenticator::ResolveCryptohomeFailureState() { | 264 SupervisedUserAuthenticator::ResolveCryptohomeFailureState() { |
265 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 265 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
266 LOG(ERROR) << "Failed to authenticate supervised user, code: " | |
ygorshenin1
2014/08/14 15:52:32
nit: s/code/mount error/
Nikita (slow)
2014/08/14 16:02:05
Done.
| |
267 << current_state_->cryptohome_code(); | |
266 if (current_state_->cryptohome_code() == | 268 if (current_state_->cryptohome_code() == |
267 cryptohome::MOUNT_ERROR_TPM_NEEDS_REBOOT) { | 269 cryptohome::MOUNT_ERROR_TPM_NEEDS_REBOOT) { |
268 // Critical TPM error detected, reboot needed. | 270 // Critical TPM error detected, reboot needed. |
269 return FAILED_TPM; | 271 return FAILED_TPM; |
270 } | 272 } |
271 | 273 |
272 if (current_state_->cryptohome_code() == | 274 if (current_state_->cryptohome_code() == |
273 cryptohome::MOUNT_ERROR_USER_DOES_NOT_EXIST) { | 275 cryptohome::MOUNT_ERROR_USER_DOES_NOT_EXIST) { |
274 // If we tried a mount but the user did not exist, then we should wait | 276 // If we tried a mount but the user did not exist, then we should wait |
275 // for online login to succeed and try again with the "create" flag set. | 277 // for online login to succeed and try again with the "create" flag set. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
335 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 337 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
336 return hash_obtained_; | 338 return hash_obtained_; |
337 } | 339 } |
338 | 340 |
339 std::string SupervisedUserAuthenticator::AuthAttempt::hash() { | 341 std::string SupervisedUserAuthenticator::AuthAttempt::hash() { |
340 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 342 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
341 return hash_; | 343 return hash_; |
342 } | 344 } |
343 | 345 |
344 } // namespace chromeos | 346 } // namespace chromeos |
OLD | NEW |