Skip to content
Commit c60143b3 authored by Eric Orth's avatar Eric Orth Committed by Chromium LUCI CQ
Browse files

Remove optionality from result lists in HostCache::Entry

The ability to track nullopt/nullptr vs empty is soon going away as a
simplification with the switch to HostResolverInternalResult, so soon
anything going through HostResolverInternalResult will just return
empty lists for what would have previously been nullopt or nullptr.
Make this change now with HostCache::Entry too, just to separate off
all of the test/plumbing churn that would occur when the switch is
made to start converting some internal results to
HostResolverInternalResult.

This is technically a behavior change for the overall HostResolver
API (and mojo API), because while I'm leaving things nullable/optional
in those APIs (to be cleaned up in a future CL), they may now sometimes
now return empty instead of null, depending on whether or not results
went through HostCache::Entry. But the behavior change doesn't actually
matter because nothing outside of tests was ever actually calling the
Get*Results() methods in situations where it would have been
nullopt/nullptr (e.g. nobody was calling GetTextResults() after address
requests).

Bug: 1381506, 1290920
Change-Id: If31219449d4a93b2e5071d5001720c3333a6198c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4545558


Auto-Submit: Eric Orth <ericorth@chromium.org>
Reviewed-by: default avatarTsuyoshi Horo <horo@chromium.org>
Reviewed-by: default avatarDominic Farolino <dom@chromium.org>
Commit-Queue: Dominic Farolino <dom@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146488}
parent 2f4d81e5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment