Commit 139b44da 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=bnc@chromium.org

Change-Id: I83e9cdc174bb9693256eb1df0a5bc1cbb39e525e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298881
Auto-Submit: Anand K Mistry <amistry@chromium.org>
Reviewed-by: default avatarBence Béky <bnc@chromium.org>
Commit-Queue: Bence Béky <bnc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788585}
parent 178f37ee
...@@ -1200,8 +1200,7 @@ TEST_F(HttpServerPropertiesManagerTest, UpdatePrefsWithCache) { ...@@ -1200,8 +1200,7 @@ TEST_F(HttpServerPropertiesManagerTest, UpdatePrefsWithCache) {
std::string expiration_string; std::string expiration_string;
ASSERT_TRUE(broken_alt_svcs_list_entry->GetStringWithoutPathExpansion( ASSERT_TRUE(broken_alt_svcs_list_entry->GetStringWithoutPathExpansion(
"broken_until", &expiration_string)); "broken_until", &expiration_string));
broken_alt_svcs_list_entry->RemoveWithoutPathExpansion("broken_until", broken_alt_svcs_list_entry->RemoveKey("broken_until");
nullptr);
// Expiration time of "www.google.com:1234" should be 5 minutes minus the // Expiration time of "www.google.com:1234" should be 5 minutes minus the
// update-prefs-delay from when the prefs were written. // update-prefs-delay from when the prefs were written.
......
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