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

Unified Diff: chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.cc

Issue 1494153002: This CL replaces e-mail with AccountId in easy signin code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bugfix in original easy unlock code' Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.cc
diff --git a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.cc b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.cc
index eb42a3369b438f8e3cfb44064be0edc05719d0d8..e65a434732f60468d8e8eaf694ced95c9ac68697 100644
--- a/chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.cc
+++ b/chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.cc
@@ -85,8 +85,8 @@ void EasyUnlockKeyManager::RefreshKeysWithTpmKeyPresent(
EasyUnlockTpmKeyManager* tpm_key_manager =
EasyUnlockTpmKeyManagerFactory::GetInstance()->GetForUser(
user_context.GetAccountId().GetUserEmail());
- const std::string tpm_public_key = tpm_key_manager->GetPublicTpmKey(
- user_context.GetAccountId().GetUserEmail());
+ const std::string tpm_public_key =
+ tpm_key_manager->GetPublicTpmKey(user_context.GetAccountId());
EasyUnlockDeviceKeyDataList devices;
if (!RemoteDeviceListToDeviceDataList(*remote_devices, &devices))
@@ -110,7 +110,7 @@ void EasyUnlockKeyManager::GetDeviceDataList(
// static
void EasyUnlockKeyManager::DeviceDataToRemoteDeviceDictionary(
- const std::string& user_id,
+ const AccountId& account_id,
const EasyUnlockDeviceKeyData& data,
base::DictionaryValue* dict) {
dict->SetString(kKeyBluetoothAddress, data.bluetooth_address);
@@ -123,7 +123,7 @@ void EasyUnlockKeyManager::DeviceDataToRemoteDeviceDictionary(
dict->SetString(kKeyPermitType, kPermitTypeLicence);
dict->SetString(kKeyPermitPermitId,
base::StringPrintf(kPermitPermitIdFormat,
- user_id.c_str()));
+ account_id.GetUserEmail().c_str()));
}
// static
@@ -161,14 +161,14 @@ bool EasyUnlockKeyManager::RemoteDeviceDictionaryToDeviceData(
// static
void EasyUnlockKeyManager::DeviceDataListToRemoteDeviceList(
- const std::string& user_id,
+ const AccountId& account_id,
const EasyUnlockDeviceKeyDataList& data_list,
base::ListValue* device_list) {
device_list->Clear();
for (size_t i = 0; i < data_list.size(); ++i) {
scoped_ptr<base::DictionaryValue> device_dict(new base::DictionaryValue);
- DeviceDataToRemoteDeviceDictionary(
- user_id, data_list[i], device_dict.get());
+ DeviceDataToRemoteDeviceDictionary(account_id, data_list[i],
+ device_dict.get());
device_list->Append(device_dict.release());
}
}

Powered by Google App Engine
This is Rietveld 408576698