| 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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 << attempt->user_context.GetAccountId().Serialize() | 232 << attempt->user_context.GetAccountId().Serialize() |
| 233 << "' has no gaia id. Cryptohome migration skipped."; | 233 << "' has no gaia id. Cryptohome migration skipped."; |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 if (need_migration) { | 236 if (need_migration) { |
| 237 chromeos::LoginEventRecorder::Get()->AddLoginTimeMarker( | 237 chromeos::LoginEventRecorder::Get()->AddLoginTimeMarker( |
| 238 "CryptohomeRename-Start", false); | 238 "CryptohomeRename-Start", false); |
| 239 const std::string& cryptohome_id_from = | 239 const std::string& cryptohome_id_from = |
| 240 attempt->user_context.GetAccountId().GetUserEmail(); // Migrated | 240 attempt->user_context.GetAccountId().GetUserEmail(); // Migrated |
| 241 const std::string cryptohome_id_to = | 241 const std::string cryptohome_id_to = |
| 242 attempt->user_context.GetAccountId().GetGaiaIdKey(); | 242 attempt->user_context.GetAccountId().GetAccountIdKey(); |
| 243 | 243 |
| 244 cryptohome::HomedirMethods::GetInstance()->RenameCryptohome( | 244 cryptohome::HomedirMethods::GetInstance()->RenameCryptohome( |
| 245 cryptohome::Identification::FromString(cryptohome_id_from), | 245 cryptohome::Identification::FromString(cryptohome_id_from), |
| 246 cryptohome::Identification::FromString(cryptohome_id_to), | 246 cryptohome::Identification::FromString(cryptohome_id_to), |
| 247 base::Bind(&OnCryptohomeRenamed, attempt, resolver, ephemeral, | 247 base::Bind(&OnCryptohomeRenamed, attempt, resolver, ephemeral, |
| 248 create_if_nonexistent)); | 248 create_if_nonexistent)); |
| 249 return; | 249 return; |
| 250 } | 250 } |
| 251 if (!already_migrated && has_gaia_id) { | 251 if (!already_migrated && has_gaia_id) { |
| 252 // Mark new users migrated. | 252 // Mark new users migrated. |
| (...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 Resolve(); | 980 Resolve(); |
| 981 } | 981 } |
| 982 | 982 |
| 983 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, | 983 void CryptohomeAuthenticator::SetOwnerState(bool owner_check_finished, |
| 984 bool check_result) { | 984 bool check_result) { |
| 985 owner_is_verified_ = owner_check_finished; | 985 owner_is_verified_ = owner_check_finished; |
| 986 user_can_login_ = check_result; | 986 user_can_login_ = check_result; |
| 987 } | 987 } |
| 988 | 988 |
| 989 } // namespace chromeos | 989 } // namespace chromeos |
| OLD | NEW |