| Index: chrome/browser/signin/easy_unlock_service.cc
|
| diff --git a/chrome/browser/signin/easy_unlock_service.cc b/chrome/browser/signin/easy_unlock_service.cc
|
| index cb498dde31f460e99a80b82ac0978676f503cf75..92f8061a99dc727551c4193e6a0a960ccb06e03a 100644
|
| --- a/chrome/browser/signin/easy_unlock_service.cc
|
| +++ b/chrome/browser/signin/easy_unlock_service.cc
|
| @@ -383,17 +383,13 @@ void EasyUnlockService::CheckCryptohomeKeysAndMaybeHardlock() {
|
| chromeos::EasyUnlockKeyManager::RemoteDeviceListToDeviceDataList(
|
| *device_list, &parsed_paired);
|
| for (const auto& device_key_data : parsed_paired)
|
| - paired_devices.insert(device_key_data.public_key);
|
| + paired_devices.insert(device_key_data.psk);
|
| }
|
| if (paired_devices.empty()) {
|
| SetHardlockState(EasyUnlockScreenlockStateHandler::NO_PAIRING);
|
| return;
|
| }
|
|
|
| - // No need to compare if a change is already recorded.
|
| - if (GetHardlockState() == EasyUnlockScreenlockStateHandler::PAIRING_CHANGED)
|
| - return;
|
| -
|
| chromeos::EasyUnlockKeyManager* key_manager =
|
| chromeos::UserSessionManager::GetInstance()->GetEasyUnlockKeyManager();
|
| DCHECK(key_manager);
|
| @@ -618,10 +614,14 @@ void EasyUnlockService::OnCryptohomeKeysFetchedForChecking(
|
|
|
| std::set<std::string> devices_in_cryptohome;
|
| for (const auto& device_key_data : key_data_list)
|
| - devices_in_cryptohome.insert(device_key_data.public_key);
|
| + devices_in_cryptohome.insert(device_key_data.psk);
|
|
|
| - if (paired_devices != devices_in_cryptohome ||
|
| - GetHardlockState() == EasyUnlockScreenlockStateHandler::NO_PAIRING) {
|
| + if (paired_devices == devices_in_cryptohome) {
|
| + if (GetHardlockState() != EasyUnlockScreenlockStateHandler::USER_HARDLOCK) {
|
| + SetHardlockStateForUser(user_id,
|
| + EasyUnlockScreenlockStateHandler::NO_HARDLOCK);
|
| + }
|
| + } else {
|
| SetHardlockStateForUser(user_id,
|
| EasyUnlockScreenlockStateHandler::PAIRING_CHANGED);
|
| }
|
|
|