fix: avoid deprecated value apis (#37590)
* fix: use base::Value::Dict:::Remove() instead of RemoveKe() the latter is deprecated. * fix: use base::Value::Dict::FindString() instead of base::Value::FindStringKey() The latter is deprecated. * chore: make lint happy
This commit is contained in:
parent
e0c348a2f8
commit
caa5989eed
3 changed files with 15 additions and 11 deletions
|
@ -123,10 +123,11 @@ void ZoomLevelDelegate::ExtractPerHostZoomLevels(
|
|||
// have an empty host.
|
||||
{
|
||||
ScopedDictPrefUpdate update(pref_service_, kPartitionPerHostZoomLevels);
|
||||
base::Value* sanitized_host_zoom_dictionary = update->Find(partition_key_);
|
||||
base::Value::Dict* sanitized_host_zoom_dictionary =
|
||||
update->FindDict(partition_key_);
|
||||
if (sanitized_host_zoom_dictionary) {
|
||||
for (const std::string& s : keys_to_remove)
|
||||
sanitized_host_zoom_dictionary->RemoveKey(s);
|
||||
for (const std::string& key : keys_to_remove)
|
||||
sanitized_host_zoom_dictionary->Remove(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue