-
Scott Sheehan authored
This change encapsulates |addrinfo| in an RAII class and abstracts the implementation details of invoking |getaddrinfo| from callers. (The callers still need to know how to use |hints| however). One helper function moved from host_resolver_proc to the |AddressInfo| class, and some massaging of error codes from host_resolver_proc was also moved to address_info.cc. The actual call to |getaddrinfo| is wrapped in a class with two virtual calls (eponymously named |getaddrinfo| and |freeaddrinfo|) so that they can be replaced in unit tests. Unit tests are added for the code in address_info.cc. Change-Id: Iada36ebbe0b783cd395f100c4e9d5753b5de2265 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1760461Reviewed-by:
Eric Orth <ericorth@chromium.org> Commit-Queue: Scott Sheehan <ssheehan@microsoft.com> Cr-Commit-Position: refs/heads/master@{#710863}
135dadb4