• Eric Orth's avatar
    Cancel requests on destruction of ContextHostResolver · 5233c3af
    Eric Orth authored
    This matches the HostResolverManager behavior where all requests get
    silently cancelled if the manager is destroyed. Now if a
    ContextHostResolver is destroyed, all requests created by that resolver
    get silently cancelled, leaving requests from other resolvers alone.
    
    Motivation:
    For DoH, need to ensure that if a context (and its per-context resolver)
    are destroyed, any requests potentially using that context for DoH are
    cancelled. Previously, DoH always used the "primary" context and we took
    special care to cancel all DNS requests on destruction of that context,
    but DoH will soon use any context from the per-context resolvers.
    
    Bug: 934402
    Change-Id: I99d087bdd17ac8e2bd54efa4c425e63abf0568ef
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1549897Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
    Commit-Queue: Eric Orth <ericorth@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#648713}
    5233c3af
host_resolver_manager_unittest.cc 254 KB