• Eric Orth's avatar
    Use a cancellable timer for delayed DoH probe start · 3421db38
    Eric Orth authored
    Allows DnsClient::CancelProbesForContext() to cleanly cancel probes
    when still waiting on initial startup delay. Nulling the
    |url_request_context_for_probes_| was not sufficient for this case
    because the context was already bound in the delayed task.
    
    For testability, moved MockDnsTransactionFactory to be visible from
    dns_test_util.h instead of just being a private internal class of
    MockDnsClient.  Allows use with a real DnsClient for DnsClientTests.
    Bunch of code churn from moving, but no real change to
    MockDnsTransactionFactory other than adding a |doh_probes_running_| to
    track when the probes have been started or canceled.
    
    Fixed: 1015555
    Change-Id: I09a23bc3e90267723d76f727be3bf5390ad6ca37
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1867443Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
    Commit-Queue: Eric Orth <ericorth@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#707664}
    3421db38
dns_client.h 4.02 KB