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

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: Add missing files. 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 "base/logging.h"
xiyuan 2016/02/17 23:14:26 not used?
Alexander Alekseev 2016/02/18 13:45:15 Done.
8 #include "chromeos/cryptohome/cryptohome_parameters.h"
9 #include "components/signin/core/account_id/account_id.h"
10 #include "components/user_manager/known_user.h"
11
12 namespace cryptohome {
13
14 class AccountId GetAccountId(const Identification& user_id) {
15 const std::vector<AccountId> known_account_ids =
16 user_manager::known_user::GetKnownAccountIds();
17
18 for (const AccountId& known_id : known_account_ids) {
19 if (known_id.GetGaiaIdKey() == user_id.id())
20 return known_id;
21 }
22
23 return user_manager::known_user::GetAccountId(user_id.id(),
24 std::string() /* gaia_id */);
25 }
26
27 } // namespace cryptohome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698