Chromium Code Reviews| 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/extended_authenticator.h" | 5 #include "chromeos/login/auth/extended_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 "chromeos/cryptohome/async_method_caller.h" | 10 #include "chromeos/cryptohome/async_method_caller.h" |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 329 cryptohome::MountError return_code) { | 329 cryptohome::MountError return_code) { |
| 330 RecordEndMarker(time_marker); | 330 RecordEndMarker(time_marker); |
| 331 if (return_code == cryptohome::MOUNT_ERROR_NONE) { | 331 if (return_code == cryptohome::MOUNT_ERROR_NONE) { |
| 332 if (!success_callback.is_null()) | 332 if (!success_callback.is_null()) |
| 333 success_callback.Run(); | 333 success_callback.Run(); |
| 334 if (old_consumer_) | 334 if (old_consumer_) |
| 335 old_consumer_->OnAuthSuccess(user_context); | 335 old_consumer_->OnAuthSuccess(user_context); |
| 336 return; | 336 return; |
| 337 } | 337 } |
| 338 | 338 |
| 339 LOG(ERROR) << "Supervised user cryptohome error, code: " << return_code; | |
|
ygorshenin1
2014/08/14 15:52:32
nit: s/code/mount error/
Nikita (slow)
2014/08/14 16:02:06
Done.
| |
| 340 | |
| 339 AuthState state = FAILED_MOUNT; | 341 AuthState state = FAILED_MOUNT; |
| 340 | 342 |
| 341 if (return_code == cryptohome::MOUNT_ERROR_TPM_COMM_ERROR || | 343 if (return_code == cryptohome::MOUNT_ERROR_TPM_COMM_ERROR || |
| 342 return_code == cryptohome::MOUNT_ERROR_TPM_DEFEND_LOCK || | 344 return_code == cryptohome::MOUNT_ERROR_TPM_DEFEND_LOCK || |
| 343 return_code == cryptohome::MOUNT_ERROR_TPM_NEEDS_REBOOT) { | 345 return_code == cryptohome::MOUNT_ERROR_TPM_NEEDS_REBOOT) { |
| 344 state = FAILED_TPM; | 346 state = FAILED_TPM; |
| 345 } | 347 } |
| 346 | 348 |
| 347 if (return_code == cryptohome::MOUNT_ERROR_USER_DOES_NOT_EXIST) | 349 if (return_code == cryptohome::MOUNT_ERROR_USER_DOES_NOT_EXIST) |
| 348 state = NO_MOUNT; | 350 state = NO_MOUNT; |
| 349 | 351 |
| 350 if (consumer_) | 352 if (consumer_) |
| 351 consumer_->OnAuthenticationFailure(state); | 353 consumer_->OnAuthenticationFailure(state); |
| 352 | 354 |
| 353 if (old_consumer_) { | 355 if (old_consumer_) { |
| 354 AuthFailure failure(AuthFailure::UNLOCK_FAILED); | 356 AuthFailure failure(AuthFailure::UNLOCK_FAILED); |
| 355 old_consumer_->OnAuthFailure(failure); | 357 old_consumer_->OnAuthFailure(failure); |
| 356 } | 358 } |
| 357 } | 359 } |
| 358 | 360 |
| 359 } // namespace chromeos | 361 } // namespace chromeos |
| OLD | NEW |