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

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

Issue 2863533003: [EasyUnlock] Serialize and store BeaconSeeds along as cryptohome key metadata. (Closed)
Patch Set: [EasyUnlock] Serialize and store BeaconSeeds along as cryptohome key metadata. Created 3 years, 7 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 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 94a5e8957b10df57231bcdc59fea14c2f896dc16..0cc07e8f9b54b96a500e26a1fad7912a9ecea0c4 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
@@ -29,6 +29,7 @@ const char kKeyPermitPermitId[] = "permitRecord.permitId";
const char kKeyPermitData[] = "permitRecord.data";
const char kKeyPermitType[] = "permitRecord.type";
const char kKeyPsk[] = "psk";
+const char kKeySerializedBeaconSeeds[] = "serializedBeaconSeeds";
const char kKeyLabelPrefix[] = "easy-unlock-";
@@ -125,6 +126,7 @@ void EasyUnlockKeyManager::DeviceDataToRemoteDeviceDictionary(
dict->SetString(kKeyPermitPermitId,
base::StringPrintf(kPermitPermitIdFormat,
account_id.GetUserEmail().c_str()));
+ dict->SetString(kKeySerializedBeaconSeeds, data.serialized_beacon_seeds);
}
// static
@@ -154,6 +156,13 @@ bool EasyUnlockKeyManager::RemoteDeviceDictionaryToDeviceData(
}
}
+ std::string serialized_beacon_seeds;
+ if (dict.GetString(kKeySerializedBeaconSeeds, &serialized_beacon_seeds)) {
+ data->serialized_beacon_seeds = serialized_beacon_seeds;
+ } else {
+ PA_LOG(ERROR) << "Expected serialized_beacon_seeds...";
Ryan Hansberry 2017/05/09 02:44:08 Nit: use a period, not ellipses, and make this err
Tim Song 2017/05/10 18:23:26 Done.
+ }
+
data->bluetooth_address.swap(bluetooth_address);
data->public_key.swap(public_key);
data->psk.swap(psk);

Powered by Google App Engine
This is Rietveld 408576698