• Eric Orth's avatar
    Allow non-address results in HostCache::Entry · 84dbdda3
    Eric Orth authored
    Changed addresses_ to an Optional and added additional optional fields
    for text results (eg for TXT records) and hostname results (eg for SRV
    or PTR records). Deliberately avoided assumptions that only one result
    field could be non-nullopt at at time (but no constructor currently
    allows creating it) because there's nothing wrong with some query
    having results of multiple types. Eg, we may in the future choose to
    pull cannonname out of AddressList and set it as a hostname result.
    
    A subsequent CL will alter HostResolverImpl to allow querying, caching,
    and returning non-address types, and it will also use HostCache::Entry
    internally (and only internally) as a results container. For now, in
    this CL, most of the code dealing with HostCache results will just
    assume Entry::addresses() always has a value.
    
    Bug: 846423
    Change-Id: I62e177452bf89e5931f75a74448f9de70b7f2357
    Reviewed-on: https://chromium-review.googlesource.com/c/1331143
    Commit-Queue: Eric Orth <ericorth@chromium.org>
    Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#609373}
    84dbdda3
host_port_pair.h 2.28 KB