10371449ba82779e45601b3eb9d680779a04b30b
Chromium change:
https://chromium.googlesource.com/chromium/src/+/1c364279dc21020a5fccd842d06a6b7eb58cd060
commit 1c364279dc21020a5fccd842d06a6b7eb58cd060
Author: Daniel Cheng <dcheng@chromium.org>
Date: Wed Jul 6 21:56:42 2022 +0000
Use base::Value::Dict in WebUI helpers where appropriate.
The primary motivation is to use `base::Value::Dict` inside
`WebUIDataSourceImpl` for its `localized_strings_` field. This ends up
having a large transitive effect, since these strings are passed to
templating functions that should take a base::Value::Dict as well.
- Update various uses of the legacy dictionary APIs to the modern
`base::Value::Dict` API.
- Where simple and unintrusive, use std::move() to pass string values
to `Set()`.
- Pass around `base::Value::Dict` by {const,mutable} reference when a
parameter is always expected to be non-null rather than relying on a
`CHECK()` in the implementation.
- Change `load_time_data` to a `base::Value::Dict` for the
various builder functions.
- Simplify a number of Set() calls with a `std::string()` or
`std::u16string()` value to use the more-efficient `""` instead.
- Remove unnecessary use of the dotted-path APIs when the dictionary
keys have no embedded `.`.
- Migrate necessary use of the dotted-path APIs to the modern form
instead of using the initializer list form.
- Remove global `std::string` objects in tests that require a static
destructor.
- Remove no-longer-needed `base::Value` wrapper when comparing against
another `base::Value()`.
- Remove a `base::NoDestructor<std::string>` caching rarely-used data.
Bug: 1187061
…
…
…
Brave Core
Brave Core is a set of changes, APIs, and scripts used for customizing Chromium to make the Brave browser. Please also check https://github.com/brave/brave-browser
Follow @brave on Twitter for important announcements.
Resources
Community
You can ask questions and interact with the community in the following locations:
- Brave Community
communitychannel on Brave Software's Slack
Languages
C++
36.9%
HTML
31.6%
Swift
9.4%
TypeScript
9%
Java
4.8%
Other
8.1%