Chromium changes:
https://chromium.googlesource.com/chromium/src/+/57a7dfb4e2645b9c62d3a005436c815f4314b5e6https://chromium.googlesource.com/chromium/src/+/a65d0fd3d0c70c37e7ac03bbc7389961eb69e66d
commit 57a7dfb4e2645b9c62d3a005436c815f4314b5e6
Author: Daniel Cheng <dcheng@chromium.org>
Date: Tue Apr 7 01:29:42 2026 -0700
Remove base/logging.h include from validation_errors.h
This header is included in many C++ source files generated from .mojom
and is fairly heavyweight. While moving the logging out of the headers
is straightforward, array validation failures generate a std::string
with some runtime details. `std::string_view` handles both cases nicely,
but there is value in minimizing the includes in this file as much as
possible. `const char*` and using `.c_str()` was the initial approach
considered, but discarded as a bit too hacky after some prototyping.
Instead, the helpers that create additional context for array validation
failures now return a struct with details about the failure. The various
validation error reporting functions have additional overloads that
internally stringify the details so that validation errors are still
reported in the exact same way.
gemini-cli was used to quickly prototype some ideas as well as implement
the overall CL, with some manual followups to improve naming and reduce
duplication.
One unintended side effect is a minor improvement in binary size, since
the new error detail structs are trivially destructible, unlike
std::string.
Bug: 499476145
Change-Id: If52b10f4928b7920ea7b120754a1798c125fefa7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7730404
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1610607}
commit a65d0fd3d0c70c37e7ac03bbc7389961eb69e66d
Author: Daniel Cheng <dcheng@chromium.org>
Date: Tue Apr 7 01:23:35 2026 -0700
Fix several more IWYU errors for base/logging.h
Bug: 499476145
Change-Id: Iba431f2c534365f9ea575c9be86bd70e8fa6a268
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7732103
Owners-Override: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1610606}