Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chromeos/login/auth/utils.h" | |
| 6 | |
| 7 #include "chromeos/cryptohome/cryptohome_parameters.h" | |
| 8 #include "components/signin/core/account_id/account_id.h" | |
| 9 #include "components/user_manager/known_user.h" | |
| 10 | |
| 11 namespace cryptohome { | |
| 12 | |
| 13 class AccountId GetAccountId(const Identification& user_id) { | |
| 14 const std::vector<AccountId> known_account_ids = | |
| 15 user_manager::known_user::GetKnownAccountIds(); | |
| 16 | |
| 17 for (const AccountId& known_id : known_account_ids) { | |
| 18 if (known_id.GetGaiaIdKey() == user_id.id()) | |
| 19 return known_id; | |
| 20 } | |
| 21 | |
| 22 return user_manager::known_user::GetAccountId(user_id.id(), | |
| 23 std::string() /* gaia_id */); | |
| 24 } | |
|
stevenjb
2016/02/23 19:27:34
This is a strange place to put something in the cr
Alexander Alekseev
2016/02/24 01:52:57
First of all, one of the important steps in this C
stevenjb
2016/02/24 17:25:43
I do not see a single instance of "namespace crypt
Alexander Alekseev
2016/02/25 07:40:46
Done.
| |
| 25 | |
| 26 } // namespace cryptohome | |
| OLD | NEW |