mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 125.0.6422.0 (#1287751)
This commit is contained in:
@ -795,7 +795,7 @@ bool CefDictionaryValueImpl::Clear() {
|
||||
|
||||
bool CefDictionaryValueImpl::HasKey(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, 0);
|
||||
return const_value().GetDict().contains(base::StringPiece(key.ToString()));
|
||||
return const_value().GetDict().contains(std::string_view(key.ToString()));
|
||||
}
|
||||
|
||||
bool CefDictionaryValueImpl::GetKeys(KeyList& keys) {
|
||||
@ -817,7 +817,7 @@ CefValueType CefDictionaryValueImpl::GetType(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, VTYPE_INVALID);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value) {
|
||||
switch (value->type()) {
|
||||
case base::Value::Type::NONE:
|
||||
@ -846,7 +846,7 @@ CefRefPtr<CefValue> CefDictionaryValueImpl::GetValue(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value) {
|
||||
return CefValueImpl::GetOrCreateRefOrCopy(const_cast<base::Value*>(value),
|
||||
mutable_value_unchecked(),
|
||||
@ -862,7 +862,7 @@ bool CefDictionaryValueImpl::GetBool(const CefString& key) {
|
||||
bool ret_value = false;
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_bool()) {
|
||||
ret_value = value->GetBool();
|
||||
}
|
||||
@ -876,7 +876,7 @@ int CefDictionaryValueImpl::GetInt(const CefString& key) {
|
||||
int ret_value = 0;
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_int()) {
|
||||
ret_value = value->GetInt();
|
||||
}
|
||||
@ -890,7 +890,7 @@ double CefDictionaryValueImpl::GetDouble(const CefString& key) {
|
||||
double ret_value = 0;
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_double()) {
|
||||
ret_value = value->GetDouble();
|
||||
}
|
||||
@ -904,7 +904,7 @@ CefString CefDictionaryValueImpl::GetString(const CefString& key) {
|
||||
std::string ret_value;
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_string()) {
|
||||
ret_value = value->GetString();
|
||||
}
|
||||
@ -917,7 +917,7 @@ CefRefPtr<CefBinaryValue> CefDictionaryValueImpl::GetBinary(
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_blob()) {
|
||||
base::Value* binary_value = const_cast<base::Value*>(value);
|
||||
return CefBinaryValueImpl::GetOrCreateRef(
|
||||
@ -932,7 +932,7 @@ CefRefPtr<CefDictionaryValue> CefDictionaryValueImpl::GetDictionary(
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_dict()) {
|
||||
base::Value* dict_value = const_cast<base::Value*>(value);
|
||||
return CefDictionaryValueImpl::GetOrCreateRef(
|
||||
@ -946,7 +946,7 @@ CefRefPtr<CefListValue> CefDictionaryValueImpl::GetList(const CefString& key) {
|
||||
CEF_VALUE_VERIFY_RETURN(false, nullptr);
|
||||
|
||||
const base::Value* value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (value && value->is_list()) {
|
||||
base::Value* list_value = const_cast<base::Value*>(value);
|
||||
return CefListValueImpl::GetOrCreateRef(
|
||||
@ -1042,14 +1042,14 @@ bool CefDictionaryValueImpl::RemoveInternal(const CefString& key) {
|
||||
// retrieve the actual Value pointer as it current exists first, for later
|
||||
// comparison purposes.
|
||||
const base::Value* actual_value =
|
||||
const_value().GetDict().Find(base::StringPiece(key.ToString()));
|
||||
const_value().GetDict().Find(std::string_view(key.ToString()));
|
||||
if (!actual_value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// |actual_value| is no longer valid after this call.
|
||||
std::optional<base::Value> out_value =
|
||||
mutable_value()->GetDict().Extract(base::StringPiece(key.ToString()));
|
||||
mutable_value()->GetDict().Extract(std::string_view(key.ToString()));
|
||||
if (!out_value.has_value()) {
|
||||
return false;
|
||||
}
|
||||
@ -1076,7 +1076,7 @@ base::Value* CefDictionaryValueImpl::SetInternal(
|
||||
// contents of the passed-in base::Value instead of keeping the same object.
|
||||
// Set() then returns the actual Value pointer as it currently exists.
|
||||
base::Value* actual_value = mutable_value()->GetDict().Set(
|
||||
base::StringPiece(key.ToString()), std::move(*value));
|
||||
std::string_view(key.ToString()), std::move(*value));
|
||||
CHECK(actual_value);
|
||||
|
||||
// |value| will be deleted when this method returns. Update the controller to
|
||||
|
Reference in New Issue
Block a user