Commit e11a50a4 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=rdevlin.cronin@chromium.org

Change-Id: Ic1fa9cea86ab7c6106af4db2837d773aaf8dac6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2298859
Auto-Submit: Anand K Mistry <amistry@chromium.org>
Reviewed-by: default avatarDevlin <rdevlin.cronin@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788748}
parent a922b23b
...@@ -233,7 +233,7 @@ bool ExtensionAssetsManagerChromeOS::CleanUpSharedExtensions( ...@@ -233,7 +233,7 @@ bool ExtensionAssetsManagerChromeOS::CleanUpSharedExtensions(
return false; return false;
} }
if (extension_info->empty()) if (extension_info->empty())
shared_extensions->RemoveWithoutPathExpansion(*it, NULL); shared_extensions->RemoveKey(*it);
} }
return true; return true;
...@@ -467,11 +467,11 @@ void ExtensionAssetsManagerChromeOS::MarkSharedExtensionUnused( ...@@ -467,11 +467,11 @@ void ExtensionAssetsManagerChromeOS::MarkSharedExtensionUnused(
FROM_HERE, FROM_HERE,
base::BindOnce(&ExtensionAssetsManagerChromeOS::DeleteSharedVersion, base::BindOnce(&ExtensionAssetsManagerChromeOS::DeleteSharedVersion,
base::FilePath(shared_path))); base::FilePath(shared_path)));
extension_info->RemoveWithoutPathExpansion(*it, NULL); extension_info->RemoveKey(*it);
} }
} }
if (extension_info->empty()) { if (extension_info->empty()) {
shared_extensions->RemoveWithoutPathExpansion(id, NULL); shared_extensions->RemoveKey(id);
// Don't remove extension dir in shared location. It will be removed by GC // Don't remove extension dir in shared location. It will be removed by GC
// when it is safe to do so, and this avoids a race condition between // when it is safe to do so, and this avoids a race condition between
// concurrent uninstall by one user and install by another. // concurrent uninstall by one user and install by another.
...@@ -559,7 +559,7 @@ bool ExtensionAssetsManagerChromeOS::CleanUpExtension( ...@@ -559,7 +559,7 @@ bool ExtensionAssetsManagerChromeOS::CleanUpExtension(
live_extension_paths->insert( live_extension_paths->insert(
std::make_pair(id, base::FilePath(shared_path))); std::make_pair(id, base::FilePath(shared_path)));
} else { } else {
extension_info->RemoveWithoutPathExpansion(*it, NULL); extension_info->RemoveKey(*it);
} }
} }
......
...@@ -46,7 +46,7 @@ ExtensionManagementPrefUpdaterBase::~ExtensionManagementPrefUpdaterBase() { ...@@ -46,7 +46,7 @@ ExtensionManagementPrefUpdaterBase::~ExtensionManagementPrefUpdaterBase() {
void ExtensionManagementPrefUpdaterBase::UnsetPerExtensionSettings( void ExtensionManagementPrefUpdaterBase::UnsetPerExtensionSettings(
const ExtensionId& id) { const ExtensionId& id) {
DCHECK(crx_file::id_util::IdIsValid(id)); DCHECK(crx_file::id_util::IdIsValid(id));
pref_->RemoveWithoutPathExpansion(id, nullptr); pref_->RemoveKey(id);
} }
void ExtensionManagementPrefUpdaterBase::ClearPerExtensionSettings( void ExtensionManagementPrefUpdaterBase::ClearPerExtensionSettings(
......
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