Commit c77f0dee authored by Anand K Mistry's avatar Anand K Mistry Committed by Commit Bot

Replace RemoveWithoutPathExpansion(.*, nullptr) with Value::RemoveKey()

DictionaryValue::RemoveWithoutPathExpansion() is deprecated. For the
case where nullptr is passed for the output argument, Value::RemoveKey()
is a trivial replacement.

Mostly done with the following command line, plus a bit of finesse:
% git grep -l RemoveWithoutPathExpansion | \
  xargs sed -E -i 's/RemoveWithoutPathExpansion\((.*), nullptr/RemoveKey\(\1/g'

Bug: 646113

This CL was uploaded by git cl split.

R=khorimoto@chromium.org

Change-Id: I9471132239f2ff79dfb6c60ddd31389fbba2aef4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298840
Auto-Submit: Anand K Mistry <amistry@chromium.org>
Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788466}
parent 005fc08c
......@@ -152,7 +152,7 @@ void EasyUnlockService::ResetLocalStateForUser(const AccountId& account_id) {
return;
DictionaryPrefUpdate update(local_state, prefs::kEasyUnlockHardlockState);
update->RemoveWithoutPathExpansion(account_id.GetUserEmail(), NULL);
update->RemoveKey(account_id.GetUserEmail());
EasyUnlockTpmKeyManager::ResetLocalStateForUser(account_id);
}
......
......@@ -265,7 +265,7 @@ void EasyUnlockServiceRegular::SetStoredRemoteDevices(
DictionaryPrefUpdate pairing_update(profile()->GetPrefs(),
prefs::kEasyUnlockPairing);
if (devices.empty())
pairing_update->RemoveWithoutPathExpansion(kKeyDevices, NULL);
pairing_update->RemoveKey(kKeyDevices);
else
pairing_update->SetKey(kKeyDevices, devices.Clone());
......
......@@ -199,7 +199,7 @@ void EasyUnlockTpmKeyManager::ResetLocalStateForUser(
return;
DictionaryPrefUpdate update(local_state, prefs::kEasyUnlockLocalStateTpmKeys);
update->RemoveWithoutPathExpansion(account_id.GetUserEmail(), NULL);
update->RemoveKey(account_id.GetUserEmail());
}
EasyUnlockTpmKeyManager::EasyUnlockTpmKeyManager(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment