[CodeHealth] Use base::DictValue/base::ListValue - Part I (#33614)

These classes were hoisted and renamed. This has been replaced in
Chromium as well. This is a mechanical change for Brave, done with the
following script.

```
git grep -lw 'Value::List' | xargs sed -i 's/\bValue::List\b/ListValue/g'
git grep -lw 'Value::Dict' | xargs sed -i 's/\bValue::Dict\b/DictValue/g'
git cl format
```

Chromium changes:
https://chromium.googlesource.com/chromium/src/+/6bc468d481835992696083e99e556516fb7f5f80

```
commit 6bc468d481835992696083e99e556516fb7f5f80
Author: Avi Drissman <avi@chromium.org>
Date:   Thu Jan 29 22:14:50 2026 -0800

    Remove aliases for base::DictValue and base::ListValue

    This removes a few last stragglers as well.

    Fixed: 478100525
    Cq-Include-Trybots: luci.chromium.try:win-official,mac-official,linux-official,android-official,android-desktop-x64-official
    Change-Id: If92142b8ab0562a82c609b71c6b2a7665cea6ec6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7513889
    Auto-Submit: Avi Drissman <avi@chromium.org>
    Commit-Queue: Daniel Cheng <dcheng@chromium.org>
    Owners-Override: Daniel Cheng <dcheng@chromium.org>
    Reviewed-by: Daniel Cheng <dcheng@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1577038}
```

Issue: https://github.com/brave/brave-browser/issues/52435
This commit is contained in:
cdesouza-chromium
2026-02-04 12:54:52 -03:00
committed by GitHub
parent 461d66e02c
commit f5c6a0136f
37 changed files with 105 additions and 106 deletions
+6 -6
View File
@@ -11,9 +11,9 @@
#include "content/public/renderer/v8_value_converter.h"
namespace gin {
bool Converter<base::Value::List>::FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> v8_value,
base::Value::List* out) {
bool Converter<base::ListValue>::FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> v8_value,
base::ListValue* out) {
std::unique_ptr<base::Value> base_value =
content::V8ValueConverter::Create()->FromV8Value(
v8_value, isolate->GetCurrentContext());
@@ -25,9 +25,9 @@ bool Converter<base::Value::List>::FromV8(v8::Isolate* isolate,
return true;
}
bool Converter<base::Value::Dict>::FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> v8_value,
base::Value::Dict* out) {
bool Converter<base::DictValue>::FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> v8_value,
base::DictValue* out) {
std::unique_ptr<base::Value> base_value =
content::V8ValueConverter::Create()->FromV8Value(
v8_value, isolate->GetCurrentContext());
+4 -4
View File
@@ -13,17 +13,17 @@
namespace gin {
template <>
struct Converter<base::Value::List> {
struct Converter<base::ListValue> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> v8_value,
base::Value::List* out);
base::ListValue* out);
};
template <>
struct Converter<base::Value::Dict> {
struct Converter<base::DictValue> {
static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> v8_value,
base::Value::Dict* out);
base::DictValue* out);
};
} // namespace gin