Commit 9f8a1e69 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=wjmaclean@chromium.org

Change-Id: I53ed23666357b69f6f5b071ccafba3fd9f35e35a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298763
Auto-Submit: Anand K Mistry <amistry@chromium.org>
Reviewed-by: default avatarJames MacLean <wjmaclean@chromium.org>
Commit-Queue: James MacLean <wjmaclean@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789954}
parent 8e42a263
...@@ -140,7 +140,7 @@ void ChromeZoomLevelPrefs::OnZoomLevelChanged( ...@@ -140,7 +140,7 @@ void ChromeZoomLevelPrefs::OnZoomLevelChanged(
} }
if (modification_is_removal) { if (modification_is_removal) {
host_zoom_dictionary_weak->RemoveWithoutPathExpansion(change.host, nullptr); host_zoom_dictionary_weak->RemoveKey(change.host);
} else { } else {
base::DictionaryValue dict; base::DictionaryValue dict;
dict.SetDouble(kZoomLevelPath, level); dict.SetDouble(kZoomLevelPath, level);
...@@ -212,7 +212,7 @@ void ChromeZoomLevelPrefs::ExtractPerHostZoomLevels( ...@@ -212,7 +212,7 @@ void ChromeZoomLevelPrefs::ExtractPerHostZoomLevels(
host_zoom_dictionaries->GetDictionary(partition_key_, host_zoom_dictionaries->GetDictionary(partition_key_,
&host_zoom_dictionary); &host_zoom_dictionary);
for (const std::string& s : keys_to_remove) for (const std::string& s : keys_to_remove)
host_zoom_dictionary->RemoveWithoutPathExpansion(s, nullptr); host_zoom_dictionary->RemoveKey(s);
} }
} }
......
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