Commit d1c9c2fa 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=rayankans@chromium.org

Change-Id: Ia0302dcba3b4a4fcaac69b8b1801e29c09cb6578
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298860
Auto-Submit: Anand K Mistry <amistry@chromium.org>
Reviewed-by: default avatarRayan Kanso <rayankans@chromium.org>
Commit-Queue: Anand K Mistry <amistry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789828}
parent 0dcdccfd
......@@ -220,7 +220,7 @@ void PushMessagingAppIdentifier::PersistToPrefs(Profile* profile) const {
PushMessagingAppIdentifier old =
FindByServiceWorker(profile, origin_, service_worker_registration_id_);
if (!old.is_null())
map->RemoveWithoutPathExpansion(old.app_id_, nullptr /* out_value */);
map->RemoveKey(old.app_id_);
map->SetKey(app_id_, base::Value(MakePrefValue(
origin_, service_worker_registration_id_)));
......@@ -232,7 +232,7 @@ void PushMessagingAppIdentifier::DeleteFromPrefs(Profile* profile) const {
DictionaryPrefUpdate update(profile->GetPrefs(),
prefs::kPushMessagingAppIdentifierMap);
base::DictionaryValue* map = update.Get();
map->RemoveWithoutPathExpansion(app_id_, nullptr /* out_value */);
map->RemoveKey(app_id_);
}
void PushMessagingAppIdentifier::DCheckValid() const {
......
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