Commit 5bfe000c 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=antrim@chromium.org

Change-Id: I9120c302b657accfed03be98ebee512e7c8b8071
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298863
Auto-Submit: Anand K Mistry <amistry@chromium.org>
Reviewed-by: default avatarDenis Kuznetsov [CET] <antrim@chromium.org>
Commit-Queue: Denis Kuznetsov [CET] <antrim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788592}
parent ebe03e92
...@@ -1001,24 +1001,19 @@ bool UserManagerBase::LoadForceOnlineSignin(const AccountId& account_id) const { ...@@ -1001,24 +1001,19 @@ bool UserManagerBase::LoadForceOnlineSignin(const AccountId& account_id) const {
void UserManagerBase::RemoveNonCryptohomeData(const AccountId& account_id) { void UserManagerBase::RemoveNonCryptohomeData(const AccountId& account_id) {
PrefService* prefs = GetLocalState(); PrefService* prefs = GetLocalState();
DictionaryPrefUpdate prefs_display_name_update(prefs, kUserDisplayName); DictionaryPrefUpdate prefs_display_name_update(prefs, kUserDisplayName);
prefs_display_name_update->RemoveWithoutPathExpansion( prefs_display_name_update->RemoveKey(account_id.GetUserEmail());
account_id.GetUserEmail(), nullptr);
DictionaryPrefUpdate prefs_given_name_update(prefs, kUserGivenName); DictionaryPrefUpdate prefs_given_name_update(prefs, kUserGivenName);
prefs_given_name_update->RemoveWithoutPathExpansion(account_id.GetUserEmail(), prefs_given_name_update->RemoveKey(account_id.GetUserEmail());
nullptr);
DictionaryPrefUpdate prefs_display_email_update(prefs, kUserDisplayEmail); DictionaryPrefUpdate prefs_display_email_update(prefs, kUserDisplayEmail);
prefs_display_email_update->RemoveWithoutPathExpansion( prefs_display_email_update->RemoveKey(account_id.GetUserEmail());
account_id.GetUserEmail(), nullptr);
DictionaryPrefUpdate prefs_oauth_update(prefs, kUserOAuthTokenStatus); DictionaryPrefUpdate prefs_oauth_update(prefs, kUserOAuthTokenStatus);
prefs_oauth_update->RemoveWithoutPathExpansion(account_id.GetUserEmail(), prefs_oauth_update->RemoveKey(account_id.GetUserEmail());
nullptr);
DictionaryPrefUpdate prefs_force_online_update(prefs, kUserForceOnlineSignin); DictionaryPrefUpdate prefs_force_online_update(prefs, kUserForceOnlineSignin);
prefs_force_online_update->RemoveWithoutPathExpansion( prefs_force_online_update->RemoveKey(account_id.GetUserEmail());
account_id.GetUserEmail(), nullptr);
known_user::RemovePrefs(account_id); known_user::RemovePrefs(account_id);
......
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