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_impl.h" | 5 #include "chromeos/login/auth/extended_authenticator_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
322 } | 322 } |
323 } | 323 } |
324 | 324 |
325 void ExtendedAuthenticatorImpl::OnOperationComplete( | 325 void ExtendedAuthenticatorImpl::OnOperationComplete( |
326 const std::string& time_marker, | 326 const std::string& time_marker, |
327 const UserContext& user_context, | 327 const UserContext& user_context, |
328 const base::Closure& success_callback, | 328 const base::Closure& success_callback, |
329 bool success, | 329 bool success, |
330 cryptohome::MountError return_code) { | 330 cryptohome::MountError return_code) { |
331 RecordEndMarker(time_marker); | 331 RecordEndMarker(time_marker); |
332 if (return_code == cryptohome::MOUNT_ERROR_NONE) { | 332 if (return_code != cryptohome::MOUNT_ERROR_NONE) { |
jdufault
2016/08/12 21:57:34
?
sammiequon
2016/08/16 17:29:09
Done.
| |
333 if (!success_callback.is_null()) | 333 if (!success_callback.is_null()) |
334 success_callback.Run(); | 334 success_callback.Run(); |
335 if (old_consumer_) | 335 if (old_consumer_) |
336 old_consumer_->OnAuthSuccess(user_context); | 336 old_consumer_->OnAuthSuccess(user_context); |
337 return; | 337 return; |
338 } | 338 } |
339 | 339 |
340 LOG(ERROR) << "Supervised user cryptohome error, code: " << return_code; | 340 LOG(ERROR) << "Supervised user cryptohome error, code: " << return_code; |
341 | 341 |
342 AuthState state = FAILED_MOUNT; | 342 AuthState state = FAILED_MOUNT; |
(...skipping 10 matching lines...) Expand all Loading... | |
353 if (consumer_) | 353 if (consumer_) |
354 consumer_->OnAuthenticationFailure(state); | 354 consumer_->OnAuthenticationFailure(state); |
355 | 355 |
356 if (old_consumer_) { | 356 if (old_consumer_) { |
357 AuthFailure failure(AuthFailure::UNLOCK_FAILED); | 357 AuthFailure failure(AuthFailure::UNLOCK_FAILED); |
358 old_consumer_->OnAuthFailure(failure); | 358 old_consumer_->OnAuthFailure(failure); |
359 } | 359 } |
360 } | 360 } |
361 | 361 |
362 } // namespace chromeos | 362 } // namespace chromeos |
OLD | NEW |