ObliviousHttpResponse headers field cannot be skipped because it's not a
nullable field and the upstream change below now validates fields.
The header value is not important since we don't check it in the test.
Chromium change:
https://chromium.googlesource.com/chromium/src.git/+/d8255385dd669
commit d8255385dd669a6580e605b8d9b04a86ed91b5c9
Author: Daniel Cheng <dcheng@chromium.org>
Date: Tue Apr 14 19:18:52 2026 -0700
Reland "Remove use deprecated [Native] types in network_param.mojom"
This is a reland of commit c565345fc495c824f8a1c54f11461dbfaf235551
The only additional fix is to mark HTTPResponseHeaders as nullable in
NetworkService::ParseHeaders().
Original change's description:
> Remove use deprecated [Native] types in network_param.mojom
>
> This ends up being large change since it is easiest to convert an entire
> tree of `[Native]` types at once, as it's a awkward to mix and match
> `[Native]` and non-`[Native]` types without introducing temporary
> `[Native]` types to bridge the transition. The opaque nature of
> `[Native]` types also means that there were types that Mojo didn't even
> know about at all, further increasing the size of the change.
>
> To avoid making network_param.mojom a dumping ground of arbitrary types,
> define the new types in distinct .mojom files, using a simple heuristic:
> if the C++ types are defined in a single header, the Mojo types should
> be defined in a single .mojom file as well. Several types previously
> defined in network_param.mojom are also moved out to match this
> heuristic.
>
> The typemap definitions are also reorganized and split into smaller
> blocks; in theory, this should allow more granular dependencies, though
> this CL does not take full advantage of this since all the trait
> definitions are built as one source set still. Additional cleanups:
> - normalize how .cc trait sources are defined in the GN rules–the
> typemap definitions no longer use `trait_sources` and depend on the
> `source_set` that includes all the trait sources
> - normalize where trait declarations and definitions live: the traits
> for X509Certificate are now in x509_certificate_mojom_traits.{cc,h}
> rather than being split across x509_certificate_mojom_traits.h and
> network_param_mojom_traits.cc.
>
> Many typemaps also need to become shared typemaps now. This is necessary
> because `URLLoaderCompletionStatus` transitively depends on `SSLInfo`,
> which was previously a `[Native]` type. Unfortunately, this results in a
> large compile size increase which is unavoidable: `[Native]` types are
> entirely opaque to Mojo and as such, very little generated code was
> needed to support them. Teaching Mojo about these types results in a lot
> more generated code.
>
> `HttpResponseHeaders` now has an internal, shared serialization helper,
> since serializing to a pickle first and then serializing to Mojo is an
> additional wasted copy. This helper is used by the original `Persist()`
> method, as well as the new `SerializeForMojoIpc()` method. It would be
> possible to do even better here, i.e. by teaching Mojo how to serialize
> a segmented string, but that is left for a future followup if additional
> efficiency is needed.
>
> Since `HttpResponseHeaders` and `X509Certificate` are no longer opaque
> types, nullability checks are now enforced by Mojo deserialization: this
> revealed several bugs (in `CertVerifierService`, `NetworkContext`, and
> `URLResponseHead`) where fields/parameters are not marked as nullable
> despite comments indicating it could be null.
>
> Finally, though it's not strictly necessary, make `HttpResponseHeaders`
> a shared typemap as well. The raw form of `HttpResponseHeaders` is hard
> to hold correctly, and it's safer to use the `net::HttpResponseHeaders`
> to handle it.
>
> Bug: 393179188