Update to Chromium version 91.0.4472.0 (#870763)

This commit is contained in:
Marshall Greenblatt
2021-04-20 18:52:34 -04:00
parent b189c7b472
commit ae4f68f695
193 changed files with 1381 additions and 1897 deletions

View File

@@ -92,17 +92,17 @@ ValueStore::WriteResult CefValueStore::Set(
if (!status_.ok())
return WriteResult(CreateStatusCopy(status_));
std::unique_ptr<ValueStoreChangeList> changes(new ValueStoreChangeList());
ValueStoreChangeList changes;
for (base::DictionaryValue::Iterator it(settings); !it.IsAtEnd();
it.Advance()) {
base::Value* old_value = nullptr;
base::Value* old_value = NULL;
if (!storage_.GetWithoutPathExpansion(it.key(), &old_value) ||
!old_value->Equals(&it.value())) {
changes->push_back(ValueStoreChange(
it.key(),
old_value ? base::Optional<base::Value>(old_value->Clone())
: base::nullopt,
it.value().Clone()));
changes.emplace_back(it.key(),
old_value
? base::Optional<base::Value>(old_value->Clone())
: base::nullopt,
it.value().Clone());
storage_.SetWithoutPathExpansion(it.key(), it.value().CreateDeepCopy());
}
}
@@ -119,13 +119,11 @@ ValueStore::WriteResult CefValueStore::Remove(
if (!status_.ok())
return WriteResult(CreateStatusCopy(status_));
std::unique_ptr<ValueStoreChangeList> changes(new ValueStoreChangeList());
for (std::vector<std::string>::const_iterator it = keys.begin();
it != keys.end(); ++it) {
ValueStoreChangeList changes;
for (auto it = keys.cbegin(); it != keys.cend(); ++it) {
std::unique_ptr<base::Value> old_value;
if (storage_.RemoveWithoutPathExpansion(*it, &old_value)) {
changes->push_back(
ValueStoreChange(*it, std::move(*old_value), base::nullopt));
changes.emplace_back(*it, std::move(*old_value), base::nullopt);
}
}
return WriteResult(std::move(changes), CreateStatusCopy(status_));