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:
Charles Kerr 2023-03-20 09:38:45 -05:00 committed by GitHub
parent e0c348a2f8
commit caa5989eed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 11 deletions

View file

@ -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);
}
}
}