Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Side by Side Diff: chromeos/login/auth/utils.cc

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Better condition in LOG_ASSERT in AccountId. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698