[DoH] Prevent DoH probes and canary domain check if pref disabled [chromium/src : main]

0 views
Skip to first unread message

Andrew Williams (Gerrit)

unread,
Mar 31, 2026, 6:05:59 PM (4 days ago) Mar 31
to Kenichi Ishibashi, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, network-ser...@chromium.org, net-r...@chromium.org
Attention needed from Kenichi Ishibashi

Andrew Williams added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Andrew Williams . resolved

Hi bashi@, would you mind looking at this CL as well? Thank you!

Open in Gerrit

Related details

Attention is currently required from:
  • Kenichi Ishibashi
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I037a31a14272644f76a565ccb3d964bc0ee50296
Gerrit-Change-Number: 7710806
Gerrit-PatchSet: 5
Gerrit-Owner: Andrew Williams <awi...@chromium.org>
Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
Gerrit-Comment-Date: Tue, 31 Mar 2026 22:05:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kenichi Ishibashi (Gerrit)

unread,
Apr 1, 2026, 12:29:20 AM (4 days ago) Apr 1
to Andrew Williams, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, network-ser...@chromium.org, net-r...@chromium.org
Attention needed from Andrew Williams

Kenichi Ishibashi added 3 comments

Commit Message
Line 10, Patchset 5 (Latest):`ResolveContext::doh_fallback_update_allowed()` returns true, we won't
Kenichi Ishibashi . unresolved

false?

File net/dns/dns_transaction_unittest.cc
Line 719, Patchset 5 (Latest): url = GURL(URLRequestMockDohJob::GetMockHttpsUrl("doh_test"));
Kenichi Ishibashi . unresolved

When `num_doh_servers` is 1, the template uses `doh_test_0` (line 714), but this `url` uses `doh_test`. If these produced different hostnames, the interceptor might not trigger. Since you fixed this logic in the `if (use_doh_fallback_upgrade)` branch (line 706), consider using similar logic here to keep it consistent and robust.

Line 3508, Patchset 5 (Latest): RunUntilIdle();
Kenichi Ishibashi . unresolved

Can we avoid using RunUntileIdle() in new tests? Is it difficult not using it? Ditto below usage.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Williams
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I037a31a14272644f76a565ccb3d964bc0ee50296
    Gerrit-Change-Number: 7710806
    Gerrit-PatchSet: 5
    Gerrit-Owner: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
    Gerrit-Comment-Date: Wed, 01 Apr 2026 04:28:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Williams (Gerrit)

    unread,
    Apr 1, 2026, 8:39:46 PM (3 days ago) Apr 1
    to Kenichi Ishibashi, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, network-ser...@chromium.org, net-r...@chromium.org
    Attention needed from Kenichi Ishibashi

    Andrew Williams added 3 comments

    Commit Message
    Line 10, Patchset 5:`ResolveContext::doh_fallback_update_allowed()` returns true, we won't
    Kenichi Ishibashi . resolved

    false?

    Andrew Williams

    ah yes 😅 good catch! changed

    File net/dns/dns_transaction_unittest.cc
    Line 719, Patchset 5: url = GURL(URLRequestMockDohJob::GetMockHttpsUrl("doh_test"));
    Kenichi Ishibashi . unresolved

    When `num_doh_servers` is 1, the template uses `doh_test_0` (line 714), but this `url` uses `doh_test`. If these produced different hostnames, the interceptor might not trigger. Since you fixed this logic in the `if (use_doh_fallback_upgrade)` branch (line 706), consider using similar logic here to keep it consistent and robust.

    Andrew Williams

    ah good catch, I didn't notice this. I think this CL preserves the original functionality at least. Would you mind if I address changing this in a follow-up CL or do you think the change should be in this CL?

    Line 3508, Patchset 5: RunUntilIdle();
    Kenichi Ishibashi . unresolved

    Can we avoid using RunUntileIdle() in new tests? Is it difficult not using it? Ditto below usage.

    Andrew Williams

    The existing tests use `RunUntilIdle` extensively which is why I initially figured we could just have the new tests match the old ones, but in the latest patchset I've updated the new tests to avoid it.

    For the cases where we actually have something to wait for, we use `base::test::RunUntil` now which is beneficial. For the cases where we are waiting just in case something happens but expect nothing to happen, the tests now use `FastForwardBy(runner->GetDelayUntilNextProbeForTest(0));` which if everything is working as expected is just `FastForwardBy(base::TimeDelta())`. I'm not sure if that's a great approach, since I'm wondering if it could theoretically have the same problems that as RunUntilIdle

    FWIW these tests do pass the Flake Endorser check, though, so it doesn't seem like they will have issues in practice...

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Kenichi Ishibashi
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I037a31a14272644f76a565ccb3d964bc0ee50296
    Gerrit-Change-Number: 7710806
    Gerrit-PatchSet: 6
    Gerrit-Owner: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
    Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Apr 2026 00:39:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Kenichi Ishibashi <ba...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kenichi Ishibashi (Gerrit)

    unread,
    Apr 2, 2026, 12:55:44 AM (3 days ago) Apr 2
    to Andrew Williams, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, network-ser...@chromium.org, net-r...@chromium.org
    Attention needed from Andrew Williams

    Kenichi Ishibashi voted and added 3 comments

    Votes added by Kenichi Ishibashi

    Code-Review+1

    3 comments

    Patchset-level comments
    File-level comment, Patchset 7 (Latest):
    Kenichi Ishibashi . resolved

    lgtm, thanks!

    File net/dns/dns_transaction_unittest.cc
    Line 719, Patchset 5: url = GURL(URLRequestMockDohJob::GetMockHttpsUrl("doh_test"));
    Kenichi Ishibashi . resolved

    When `num_doh_servers` is 1, the template uses `doh_test_0` (line 714), but this `url` uses `doh_test`. If these produced different hostnames, the interceptor might not trigger. Since you fixed this logic in the `if (use_doh_fallback_upgrade)` branch (line 706), consider using similar logic here to keep it consistent and robust.

    Andrew Williams

    ah good catch, I didn't notice this. I think this CL preserves the original functionality at least. Would you mind if I address changing this in a follow-up CL or do you think the change should be in this CL?

    Kenichi Ishibashi

    Addressing in a follow-up CL is totally fine.

    Line 3508, Patchset 5: RunUntilIdle();
    Kenichi Ishibashi . resolved

    Can we avoid using RunUntileIdle() in new tests? Is it difficult not using it? Ditto below usage.

    Andrew Williams

    The existing tests use `RunUntilIdle` extensively which is why I initially figured we could just have the new tests match the old ones, but in the latest patchset I've updated the new tests to avoid it.

    For the cases where we actually have something to wait for, we use `base::test::RunUntil` now which is beneficial. For the cases where we are waiting just in case something happens but expect nothing to happen, the tests now use `FastForwardBy(runner->GetDelayUntilNextProbeForTest(0));` which if everything is working as expected is just `FastForwardBy(base::TimeDelta())`. I'm not sure if that's a great approach, since I'm wondering if it could theoretically have the same problems that as RunUntilIdle

    FWIW these tests do pass the Flake Endorser check, though, so it doesn't seem like they will have issues in practice...

    Kenichi Ishibashi

    Yeah, I agree with your points. I sometimes do `FastForwardBy(base::TimeDelta())`, which is effectively equivalent to `RunUntilIdle()`.

    For now, I'm fine with either approach.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Williams
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I037a31a14272644f76a565ccb3d964bc0ee50296
    Gerrit-Change-Number: 7710806
    Gerrit-PatchSet: 7
    Gerrit-Owner: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
    Gerrit-Comment-Date: Thu, 02 Apr 2026 04:55:07 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Kenichi Ishibashi <ba...@chromium.org>
    Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Apr 3, 2026, 2:22:06 PM (yesterday) Apr 3
    to Andrew Williams, Brian Begnoche, Kenichi Ishibashi, AyeAye, chromium...@chromium.org, network-ser...@chromium.org, net-r...@chromium.org

    Chromium LUCI CQ submitted the change

    Unreviewed changes

    7 is the latest approved patch-set.
    No files were changed between the latest approved patch-set and the submitted one.

    Change information

    Commit message:
    [DoH] Prevent DoH probes and canary domain check if pref disabled

    This CL makes it so that when
    `ResolveContext::doh_fallback_update_allowed()` returns false, we won't
    send DoH probes to the fallback DoH servers and we won't send the canary
    domain check. This allows us to mitigate possible side effects for users
    not eligible for the upcoming experiment to use a fallback DoH provider
    for Enhanced Safe Browsing users.

    Note that the current approach has the limitation that when
    `doh_fallback_update_allowed()` transitions from false to true, we
    won't trigger new DoH probes to be sent or new canary domain queries to
    be sent. This is acceptable for the experiment since it's unlikely for
    users to change their settings and the purpose of the experiment is only
    to measure the performance impacts of this functionality across the
    broader user population.
    Bug: 490045356
    Change-Id: I037a31a14272644f76a565ccb3d964bc0ee50296
    Reviewed-by: Kenichi Ishibashi <ba...@chromium.org>
    Commit-Queue: Andrew Williams <awi...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1609876}
    Files:
    • M net/dns/canary_domain_service.cc
    • M net/dns/canary_domain_service_unittest.cc
    • M net/dns/dns_transaction.cc
    • M net/dns/dns_transaction_unittest.cc
    • M net/dns/resolve_context.cc
    • M services/network/network_context_unittest.cc
    Change size: M
    Delta: 6 files changed, 225 insertions(+), 14 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Kenichi Ishibashi
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I037a31a14272644f76a565ccb3d964bc0ee50296
    Gerrit-Change-Number: 7710806
    Gerrit-PatchSet: 9
    Gerrit-Owner: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
    Gerrit-CC: Brian Begnoche <b...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages