| 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/cryptohome_authenticator.h" | 5 #include "chromeos/login/auth/cryptohome_authenticator.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 // Reset the verified flag. | 494 // Reset the verified flag. |
| 495 owner_is_verified_ = false; | 495 owner_is_verified_ = false; |
| 496 | 496 |
| 497 StartMount(current_state_->AsWeakPtr(), | 497 StartMount(current_state_->AsWeakPtr(), |
| 498 scoped_refptr<CryptohomeAuthenticator>(this), | 498 scoped_refptr<CryptohomeAuthenticator>(this), |
| 499 false /* ephemeral */, false /* create_if_nonexistent */); | 499 false /* ephemeral */, false /* create_if_nonexistent */); |
| 500 } | 500 } |
| 501 | 501 |
| 502 void CryptohomeAuthenticator::CompleteLogin(content::BrowserContext* context, | 502 void CryptohomeAuthenticator::CompleteLogin(content::BrowserContext* context, |
| 503 const UserContext& user_context) { | 503 const UserContext& user_context) { |
| 504 DCHECK_EQ(user_manager::USER_TYPE_REGULAR, user_context.GetUserType()); | 504 DCHECK(user_context.GetUserType() == user_manager::USER_TYPE_REGULAR || |
| 505 user_context.GetUserType() == user_manager::USER_TYPE_AD); |
| 505 authentication_context_ = context; | 506 authentication_context_ = context; |
| 506 current_state_.reset(new AuthAttemptState(user_context, | 507 current_state_.reset(new AuthAttemptState(user_context, |
| 507 true, // unlock | 508 true, // unlock |
| 508 false, // online_complete | 509 false, // online_complete |
| 509 !IsKnownUser(user_context))); | 510 !IsKnownUser(user_context))); |
| 510 | 511 |
| 511 // Reset the verified flag. | 512 // Reset the verified flag. |
| 512 owner_is_verified_ = false; | 513 owner_is_verified_ = false; |
| 513 | 514 |
| 514 StartMount(current_state_->AsWeakPtr(), | 515 StartMount(current_state_->AsWeakPtr(), |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 Resolve(); | 998 Resolve(); |
| 998 } | 999 } |
| 999 | 1000 |
| 1000 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, | 1001 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, |
| 1001 bool check_result) { | 1002 bool check_result) { |
| 1002 owner_is_verified_ = owner_check_finished; | 1003 owner_is_verified_ = owner_check_finished; |
| 1003 user_can_login_ = check_result; | 1004 user_can_login_ = check_result; |
| 1004 } | 1005 } |
| 1005 | 1006 |
| 1006 } // namespace chromeos | 1007 } // namespace chromeos |
| OLD | NEW |