Implement Canary Domain check to disable DoH fallback. [chromium/src : main]

0 views
Skip to first unread message

Brian Begnoche (Gerrit)

unread,
Feb 11, 2026, 2:05:41 PMFeb 11
to Kenichi Ishibashi, Andrew Williams, David Schinazi, Chromium Metrics Reviews, AyeAye, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
Attention needed from Andrew Williams, David Schinazi and Kenichi Ishibashi

Brian Begnoche added 5 comments

Patchset-level comments
File-level comment, Patchset 15:
Brian Begnoche . resolved

I will close this once I've added tests to host_resolver_manager_unittest.cc.

Brian Begnoche

Done

File net/dns/canary_domain_service.cc
Line 109, Patchset 22:void CanaryDomainService::OnProbeComplete(const std::string& probe_name,
Kenichi Ishibashi . resolved

We don't need this since `pending_probe_` has it?

Brian Begnoche

I did this to be able to log the case where `std::move(pending_probe_)` returns null. What do you think? Unnecessary?

Brian Begnoche

In any case, this is moot now that I've made this callback specifically for Secure DNS probe to match.

File net/dns/dns_client.cc
Line 128, Patchset 19: config->doh_config =
Andrew Williams . resolved

I was originally wondering whether the canary domain check and the test DoH probes would need to happen in that order. I had convinced myself that they didn't need to be ordered and that once both succeeded we'd upgrade queries that happen after. After thinking about it again, though, it seems like before the test DoH probes run we need `config->doh_config` to be set to the DoH config we should send probes for (which wouldn't be the case in this if block)... I'm not sure what the right thing to do here is

Kenichi Ishibashi

It seems we should have a state (enum class) instead of having a boolean flag to distinguish the states? Probably kUnknown (checking), kPositive, kNegative.

Brian Begnoche

Andrew and I talked more about this timing thing. Our conclusion is that timing is OK for two reasons:

1. Because the code here doesn't allow fallback upgrade until the canary domain check finishes successfully, the prober when fallback is needed won't occur until that happens and a system config update triggers the probe.

2. `HostResolverManager::PushDnsTasks` won't push the `SECURE_DNS` task until the following two things both happen:

 (a) The canary domain check is positive and retriggers config update here to allow the fallback upgrade.

(b) The DoH prober doesn't record enough failures to make `DnsClient::FallbackFromSecureTransactionPreferred` start returning false.

I've also updated the histogram to log an enum.
Line 135, Patchset 15: config->secure_dns_mode = SecureDnsMode::kOff;
Andrew Williams . resolved

I don't think we should change secure_dns_mode, can we not just avoid modifying doh_config in the case when the canary domain indicates we should fallback to Google DNS? That's how the code works today

Brian Begnoche

I can see both ways. IMO it makes sense to clearly categorize this as a case where Secure DNS is turned off because fallback is not possible.

I'd like to hear thoughts from net owners.

Kenichi Ishibashi

I'm wondering if we should add kDisabledByCanaryDomainCheck to categorize precisely.

Brian Begnoche

Andrew and I talked about this. I'm happy to sync with you on this if needed, Kenichi.

The gist is that we want to remain consistent with the way the Doh prober works today. That prober only prevents pushing the `SECURE_DNS` task for DNS lookups. The way this happens is that `DnsClient::FallbackFromSecureTransactionPreferred` returns false when the prober has failed, and the `SECURE_DNS` task is not allowed.

crsrc.org/c/net/dns/host_resolver_manager.cc;l=1310;drc=ef55be496e45889ace33ace4b05094ca19cb499b;bpv=1;bpt=1

The failed probe doesn't set `secure_dns_mode` to OFF, so we won't do that here either. I've added mention of this in the design doc too.

Line 253, Patchset 15: doh_fallback_allowed_by_canary_domain_ = allowed;
Andrew Williams . resolved

I wonder if the more consistent way of applying this change would be to have an entry in DnsConfigOverrides for this boolean and setting that here. Then we don't need the `doh_fallback_allowed_by_canary_domain_ == allowed` check, because IIUC that's handled by UpdateDnsConfig

Brian Begnoche

I thought about this too. The reason I didn't do that was that I didn't want `SetConfigOverrides` to clobber this. So it'd need to do something to persist this value after updating the overrides. It's like an override of overrides, so kind of odd.

Alternatively, it could be a second DnsConfigOverrides that just stores this override, but then `UpdateDnsConfig` needs to be updated regardless. I guess there is an advantage to this in that it would be a canned `DnsConfigOverrides` that can (1) set this value (2) override `secure_dns_mode` (3) clear `doh_config.servers`.

I think I would prefer the latter approach, if anything. What are your thoughts?

Kenichi Ishibashi

I had the same question. It's a good point we don't want to clobber canary domain check. Regardless how we handle it, could you document the requirement?

Brian Begnoche

I still need to act on this comment on way or the other. I'm hesitant to introduce a precedent for overrides that aren't overridable, or something novel like that, so I'm still a bit inclined to keep this as is.

Ack to bashi to document whatever we end up with.

I'd appreciate hearing any strong opinions against leaving it like this.

Brian Begnoche

I added discussion on why `SetDohFallbackAllowedByCanaryDomain` is added to record and retain the canary domain result.

https://docs.google.com/document/d/1hN7cVtyqKE-qCArtQJWnOeniRjx6NSaYyyz5EP9cpWA/edit?pli=1&resourcekey=0-rdt7WOE8fVokAgiByxGCLQ&tab=t.0#bookmark=id.w9hakfa0iqhc

Please comment where you feel that comments in code are not inadequate.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Williams
  • David Schinazi
  • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
Gerrit-Change-Number: 7509892
Gerrit-PatchSet: 24
Gerrit-Owner: Brian Begnoche <b...@chromium.org>
Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
Gerrit-Attention: Andrew Williams <awi...@chromium.org>
Gerrit-Attention: David Schinazi <dsch...@chromium.org>
Gerrit-Comment-Date: Wed, 11 Feb 2026 19:05:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Brian Begnoche <b...@chromium.org>
Comment-In-Reply-To: Kenichi Ishibashi <ba...@chromium.org>
Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kenichi Ishibashi (Gerrit)

unread,
Feb 11, 2026, 11:50:18 PMFeb 11
to Brian Begnoche, Andrew Williams, David Schinazi, Chromium Metrics Reviews, AyeAye, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
Attention needed from Andrew Williams, Brian Begnoche and David Schinazi

Kenichi Ishibashi added 1 comment

File net/dns/canary_domain_service.cc
Line 37, Patchset 21: params.dns_query_type = DnsQueryType::UNSPECIFIED; // both A and AAAA
Kenichi Ishibashi . resolved

We don't have to set this since `UNSPECIFIED` is the default initial value (also UNSPECIFIED may query HTTPS).

Brian Begnoche

I removed this.

About UNSPECIFIED possibly using HTTPS, does this present an issue with being consistent with the canary domain check for prefetch proxy? It specifically mentions just A and AAAA, so I'm not sure whether allowing anything else makes sense.

 https://developer.chrome.com/docs/privacy-security/private-prefetch-proxy-for-network-admins#details_of_the_signaling_mechanism?
Kenichi Ishibashi

I just realized we wouldn't query HTTPS in this check since we use HostPortPair to call HostResolver::CreateRequest(). We only query HTTPS when scheme (`https://`) is specified.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Williams
  • Brian Begnoche
  • David Schinazi
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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
    Gerrit-Change-Number: 7509892
    Gerrit-PatchSet: 24
    Gerrit-Owner: Brian Begnoche <b...@chromium.org>
    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
    Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
    Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Brian Begnoche <b...@chromium.org>
    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
    Gerrit-Attention: David Schinazi <dsch...@chromium.org>
    Gerrit-Comment-Date: Thu, 12 Feb 2026 04:49:45 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Williams (Gerrit)

    unread,
    Feb 12, 2026, 10:32:18 AMFeb 12
    to Brian Begnoche, Kenichi Ishibashi, David Schinazi, Chromium Metrics Reviews, AyeAye, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
    Attention needed from Brian Begnoche and David Schinazi

    Andrew Williams added 2 comments

    File services/network/network_service.h
    Line 96, Patchset 24 (Latest): public net::NetworkChangeNotifier::DNSObserver {
    Andrew Williams . unresolved

    I think we're missing the NetworkChangeNotifier::AddDNSObserver / NetworkChangeNotifier::RemoveDNSObserver calls needed to hook this up

    File services/network/network_service.cc
    Line 1261, Patchset 24 (Latest): MaybeProbeSecureDnsCanaryDomain();
    Andrew Williams . unresolved

    Should we call `host_resolver_manager()->SetDohFallbackAllowedByCanaryDomain(false)` here so that we don't attempt to use secure DNS until the new canary domain check comes back?

    I'm not sure whether OnDNSChanged will trigger before the state of the probes change (triggering resending the probes), though, so if not it seems unfortunate that we might:
    - Received a system DNS change
    - Start the probes
    - This method gets called and we update the DnsConfig to indicate that the canary domain check hasn't succeeded
    - Cancel the DoH probes (I think?)
    - Do the canary domain check and update the DnsConfig if they pass
    - Restart the DoH probes
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Brian Begnoche
    • David Schinazi
    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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
      Gerrit-Change-Number: 7509892
      Gerrit-PatchSet: 24
      Gerrit-Owner: Brian Begnoche <b...@chromium.org>
      Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
      Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
      Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Brian Begnoche <b...@chromium.org>
      Gerrit-Attention: David Schinazi <dsch...@chromium.org>
      Gerrit-Comment-Date: Thu, 12 Feb 2026 15:32:12 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Brian Begnoche (Gerrit)

      unread,
      Feb 15, 2026, 11:53:17 AMFeb 15
      to Kenichi Ishibashi, Andrew Williams, David Schinazi, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
      Attention needed from Andrew Williams and David Schinazi

      Brian Begnoche added 4 comments

      Patchset-level comments
      File-level comment, Patchset 26:
      Brian Begnoche . resolved

      bashi's feedback is to incorporate awillia's proposal (crrev.com/c/7567908) to shift to CanaryDomainService ownership by NetworkContext. I have done that.

      File services/network/network_context.cc
      Line 1025, Patchset 27 (Latest): if (base::FeatureList::IsEnabled(
      Brian Begnoche . resolved

      I have added this here, which means that the canary domain check won't start until after the DoH probe delay. Basically they start together.

      I pondered and concluded that this is reasonable. I've become more and more convinced that the more that these two are consistent and work in concert, the better.

      If we don't want to delay on the canary domain check, then we could add an `NetworkContext::ActivateCanaryDomainCheck` method that just does this added bit, and then `NetworkService::ActivateAllDohProbes` would call this new method to avoid the timer delay.

      File services/network/network_service.h
      Line 96, Patchset 24: public net::NetworkChangeNotifier::DNSObserver {
      Andrew Williams . resolved

      I think we're missing the NetworkChangeNotifier::AddDNSObserver / NetworkChangeNotifier::RemoveDNSObserver calls needed to hook this up

      Brian Begnoche

      You're right. I did this and didn't upload. This is a moot point now after moving `CanaryDomainService` ownership to `NetworkContext`.

      File services/network/network_service.cc
      Line 1261, Patchset 24: MaybeProbeSecureDnsCanaryDomain();
      Andrew Williams . resolved

      Should we call `host_resolver_manager()->SetDohFallbackAllowedByCanaryDomain(false)` here so that we don't attempt to use secure DNS until the new canary domain check comes back?

      I'm not sure whether OnDNSChanged will trigger before the state of the probes change (triggering resending the probes), though, so if not it seems unfortunate that we might:
      - Received a system DNS change
      - Start the probes
      - This method gets called and we update the DnsConfig to indicate that the canary domain check hasn't succeeded
      - Cancel the DoH probes (I think?)
      - Do the canary domain check and update the DnsConfig if they pass
      - Restart the DoH probes
      Brian Begnoche

      This is a moot point now that `CanaryDomainService` creation and triggering the canary domain probe are moved to `NetworkContext::ActivateDohProbes`.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Andrew Williams
      • David Schinazi
      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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
        Gerrit-Change-Number: 7509892
        Gerrit-PatchSet: 27
        Gerrit-Owner: Brian Begnoche <b...@chromium.org>
        Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
        Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
        Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Andrew Williams <awi...@chromium.org>
        Gerrit-Attention: David Schinazi <dsch...@chromium.org>
        Gerrit-Comment-Date: Sun, 15 Feb 2026 16:53:10 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Kenichi Ishibashi (Gerrit)

        unread,
        Feb 15, 2026, 9:10:07 PMFeb 15
        to Brian Begnoche, Chromium LUCI CQ, Andrew Williams, David Schinazi, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
        Attention needed from Andrew Williams, Brian Begnoche and David Schinazi

        Kenichi Ishibashi added 14 comments

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

        (Still haven't looked into tests)

        File net/dns/canary_domain_service.h
        Line 71, Patchset 27 (Latest): base::WeakPtr<ResolveContext> resolve_context_;

        // The HostResolver that this service uses to perform probes.
        base::WeakPtr<HostResolver> host_resolver_;
        Kenichi Ishibashi . unresolved

        What's the expected life time relation between `resolve_context_`, `host_resolver_` and this service? IIUC NetworkContext owns ResolveContext (via UrlRequestContext, ContextHostResolver). If ResolveContext/HostResolver are expected to outlive `this`, probably using base::SafeRef would be better.

        Line 39, Patchset 27 (Latest):// Service for probing canary domains. It is owned by a HostResolverManager.
        Kenichi Ishibashi . unresolved

        NetworkContext?

        File net/dns/canary_domain_service.cc
        Line 35, Patchset 27 (Latest): HostResolver::ResolveHostParameters::CacheUsage::DISALLOWED;
        Kenichi Ishibashi . unresolved

        nit: Could you add a comment why we disable secure DNS for this probe (it may not be obvious if the reader is not very familiar with canary domain check)?

        Line 70, Patchset 27 (Latest): NetLogSourceType::CANARY_DOMAIN_SERVICE)) {}
        Kenichi Ishibashi . unresolved

        Add `CHECK(base::FeatureList::IsEnabled(features::kProbeSecureDnsCanaryDomain))` ?

        Line 79, Patchset 27 (Latest): if (resolve_context_) {
        Kenichi Ishibashi . unresolved

        Should we CHECK(resolve_context_) instead?

        Line 80, Patchset 27 (Latest): resolve_context_->RegisterDohStatusObserver(this);
        Kenichi Ishibashi . unresolved

        optional: Does this mean Start() should be called only once. Should we somehow ensure the precondition?

        Line 90, Patchset 27 (Latest): if (base::FeatureList::IsEnabled(features::kProbeSecureDnsCanaryDomain)) {
        Kenichi Ishibashi . unresolved

        Should this be `CHECK(base::FeatureList::IsEnabled(features::kProbeSecureDnsCanaryDomain))`?

        If we add CHECK in the ctor, the check would be redundant.

        Line 92, Patchset 27 (Latest): resolve_context_->canary_domain_check_status() ==
        ResolveContext::CanaryDomainCheckStatus::kNotStarted) {
        Kenichi Ishibashi . unresolved

        awillia@: Does this look reasonable (I guess the answer is yes)? Or should we always (re)start probe? If so, should we reset the check status?

        File net/dns/canary_domain_service_unittest.cc
        Line 1, Patchset 27 (Latest):#include "net/dns/canary_domain_service.h"
        Kenichi Ishibashi . unresolved

        Missing licence header comment.

        File net/dns/dns_client.cc
        Line 224, Patchset 27 (Latest): UMA_HISTOGRAM_ENUMERATION("Net.DNS.FallbackFromSecureTransactionPreferred",
        File net/dns/host_resolver.h
        Line 567, Patchset 27 (Latest): virtual std::unique_ptr<CanaryDomainService> CreateCanaryDomainService();
        Kenichi Ishibashi . unresolved

        Please add a description comment for virtual method that is considered as an interface to HostResolver.

        File net/dns/resolve_context.h
        Line 233, Patchset 27 (Latest): enum class CanaryDomainCheckStatus {
        Kenichi Ishibashi . unresolved

        nit: Please add description comments.

        File services/network/network_service_unittest.cc
        Line 139, Patchset 27 (Latest): protected:
        Kenichi Ishibashi . unresolved

        Why do we need make this change? Can't we use `task_environment()` and `service()` in tests?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Andrew Williams
        • Brian Begnoche
        • David Schinazi
        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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
          Gerrit-Change-Number: 7509892
          Gerrit-PatchSet: 27
          Gerrit-Owner: Brian Begnoche <b...@chromium.org>
          Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
          Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
          Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
          Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-Attention: Brian Begnoche <b...@chromium.org>
          Gerrit-Attention: Andrew Williams <awi...@chromium.org>
          Gerrit-Attention: David Schinazi <dsch...@chromium.org>
          Gerrit-Comment-Date: Mon, 16 Feb 2026 02:09:33 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Brian Begnoche (Gerrit)

          unread,
          Feb 17, 2026, 3:57:08 PM (14 days ago) Feb 17
          to Chromium LUCI CQ, Kenichi Ishibashi, Andrew Williams, David Schinazi, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
          Attention needed from Andrew Williams, David Schinazi and Kenichi Ishibashi

          Brian Begnoche added 14 comments

          File net/dns/canary_domain_service.h
          Line 71, Patchset 27: base::WeakPtr<ResolveContext> resolve_context_;


          // The HostResolver that this service uses to perform probes.
          base::WeakPtr<HostResolver> host_resolver_;
          Kenichi Ishibashi . resolved

          What's the expected life time relation between `resolve_context_`, `host_resolver_` and this service? IIUC NetworkContext owns ResolveContext (via UrlRequestContext, ContextHostResolver). If ResolveContext/HostResolver are expected to outlive `this`, probably using base::SafeRef would be better.

          Brian Begnoche

          I've changed to SafeRef and added documentation on these, as well as on the constructor above and HostResolver::CreateCanaryDomainService to clarify lifetime expectations.

          Line 39, Patchset 27:// Service for probing canary domains. It is owned by a HostResolverManager.
          Kenichi Ishibashi . resolved

          NetworkContext?

          Brian Begnoche

          Done

          File net/dns/canary_domain_service.cc
          Line 35, Patchset 27: HostResolver::ResolveHostParameters::CacheUsage::DISALLOWED;
          Kenichi Ishibashi . resolved

          nit: Could you add a comment why we disable secure DNS for this probe (it may not be obvious if the reader is not very familiar with canary domain check)?

          Brian Begnoche

          Done

          Line 70, Patchset 27: NetLogSourceType::CANARY_DOMAIN_SERVICE)) {}
          Kenichi Ishibashi . resolved

          Add `CHECK(base::FeatureList::IsEnabled(features::kProbeSecureDnsCanaryDomain))` ?

          Brian Begnoche

          Done. Also checked for canary domain. I added a comment in .h file to specify that this feature needs to be enabled.

          Line 79, Patchset 27: if (resolve_context_) {
          Kenichi Ishibashi . resolved

          Should we CHECK(resolve_context_) instead?

          Brian Begnoche

          This happens now implicitly since it is a SafeRef.

          Line 80, Patchset 27: resolve_context_->RegisterDohStatusObserver(this);
          Kenichi Ishibashi . resolved

          optional: Does this mean Start() should be called only once. Should we somehow ensure the precondition?

          Brian Begnoche

          You're right. `RegisterDohStatusObserver` will enforce this implicitly by failing on a check that the passed in observer isn't already registered.

          I'm going to assume that this is sufficient and not needing additional, more explicit enforcement. I added a comment on this method in the .h file to call this out.

          Line 90, Patchset 27: if (base::FeatureList::IsEnabled(features::kProbeSecureDnsCanaryDomain)) {
          Kenichi Ishibashi . resolved

          Should this be `CHECK(base::FeatureList::IsEnabled(features::kProbeSecureDnsCanaryDomain))`?

          If we add CHECK in the ctor, the check would be redundant.

          Brian Begnoche

          CHECK is added to the constructor. Removed this check here.

          Line 92, Patchset 27: resolve_context_->canary_domain_check_status() ==
          ResolveContext::CanaryDomainCheckStatus::kNotStarted) {
          Kenichi Ishibashi . resolved

          awillia@: Does this look reasonable (I guess the answer is yes)? Or should we always (re)start probe? If so, should we reset the check status?

          Brian Begnoche

          awillia and I talked about this a bit, and I think we agree with your suggestion to restart. I've updated ProbeSecureDnsDomain to reset the check status and added a test.

          File net/dns/canary_domain_service_unittest.cc
          Line 1, Patchset 27:#include "net/dns/canary_domain_service.h"
          Kenichi Ishibashi . resolved

          Missing licence header comment.

          Brian Begnoche

          Done

          File net/dns/dns_client.cc
          Line 224, Patchset 27: UMA_HISTOGRAM_ENUMERATION("Net.DNS.FallbackFromSecureTransactionPreferred",
          Kenichi Ishibashi . resolved
          Brian Begnoche

          Done

          Line 224, Patchset 27: UMA_HISTOGRAM_ENUMERATION("Net.DNS.FallbackFromSecureTransactionPreferred",
          Kenichi Ishibashi . resolved
          Brian Begnoche

          Done

          File net/dns/host_resolver.h
          Line 567, Patchset 27: virtual std::unique_ptr<CanaryDomainService> CreateCanaryDomainService();
          Kenichi Ishibashi . resolved

          Please add a description comment for virtual method that is considered as an interface to HostResolver.

          Brian Begnoche

          Done

          File net/dns/resolve_context.h
          Line 233, Patchset 27: enum class CanaryDomainCheckStatus {
          Kenichi Ishibashi . resolved

          nit: Please add description comments.

          Brian Begnoche

          Done

          File services/network/network_service_unittest.cc
          Line 139, Patchset 27: protected:
          Kenichi Ishibashi . resolved

          Why do we need make this change? Can't we use `task_environment()` and `service()` in tests?

          Brian Begnoche

          reverted

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Andrew Williams
          • David Schinazi
          • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
            Gerrit-Change-Number: 7509892
            Gerrit-PatchSet: 27
            Gerrit-Owner: Brian Begnoche <b...@chromium.org>
            Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
            Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
            Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
            Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
            Gerrit-Attention: Andrew Williams <awi...@chromium.org>
            Gerrit-Attention: David Schinazi <dsch...@chromium.org>
            Gerrit-Comment-Date: Tue, 17 Feb 2026 20:57:03 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Kenichi Ishibashi <ba...@chromium.org>
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            David Schinazi (Gerrit)

            unread,
            Feb 18, 2026, 2:45:49 PM (13 days ago) Feb 18
            to Brian Begnoche, Chromium LUCI CQ, Kenichi Ishibashi, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
            Attention needed from Andrew Williams, Brian Begnoche and Kenichi Ishibashi

            David Schinazi added 1 comment

            Patchset-level comments
            File-level comment, Patchset 29 (Latest):
            David Schinazi . resolved

            I've reviewed this change and overall the approach seems reasonable to me. I'll let Kenichi do the actual review though, so I'm moving myself from R= to CC=.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Andrew Williams
            • Brian Begnoche
            • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
            Gerrit-Change-Number: 7509892
            Gerrit-PatchSet: 29
            Gerrit-Owner: Brian Begnoche <b...@chromium.org>
            Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
            Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
            Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-CC: David Schinazi <dsch...@chromium.org>
            Gerrit-Attention: Brian Begnoche <b...@chromium.org>
            Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
            Gerrit-Attention: Andrew Williams <awi...@chromium.org>
            Gerrit-Comment-Date: Wed, 18 Feb 2026 19:45:38 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy

            Kenichi Ishibashi (Gerrit)

            unread,
            Feb 19, 2026, 2:25:05 AM (12 days ago) Feb 19
            to Brian Begnoche, David Schinazi, Chromium LUCI CQ, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
            Attention needed from Andrew Williams and Brian Begnoche

            Kenichi Ishibashi added 15 comments

            File net/dns/canary_domain_service_unittest.cc
            Line 59, Patchset 30 (Latest): base::RunLoop().RunUntilIdle();
            Kenichi Ishibashi . unresolved

            We shouldn't use RunUntilIdle() in new tests since it's one of major sources of flakiness.

            Instead, we probably want to add SetSecureDnsProbeCompleteCallbackForTesting() to CanaryDomainService, in a way similar to https://source.chromium.org/chromium/chromium/src/+/main:net/http/http_stream_pool_test_util.cc;l=438;drc=21d7e84d240f65df7594e5f3526d63e4439dd356

            (I don't think we need an extra PostTask in the callback for these tests)

            Line 158, Patchset 30 (Latest): base::RunLoop().RunUntilIdle();
            Kenichi Ishibashi . unresolved

            Ditto.

            File net/dns/dns_client.cc
            Line 94, Patchset 30 (Latest): config.dns_over_tls_hostname)))) {
            Kenichi Ishibashi . unresolved

            Q: Do we support DoT? I'm not aware of DoT support and I'm wondering why we need to check it.

            Line 213, Patchset 30 (Latest): enum class FallbackFromSecureTransactionPreferredReason {
            Kenichi Ishibashi . unresolved

            nit: We prefer putting enum declarations before methods/constructors.

            https://google.github.io/styleguide/cppguide.html#Declaration_Order

            File net/dns/dns_client_unittest.cc
            Line 269, Patchset 30 (Latest):TEST_F(DnsClientTest, FallbackFromSecureTransactionPreferred_Failures) {
            Kenichi Ishibashi . unresolved

            Does this mean the previous name was wrong?

            Line 311, Patchset 30 (Latest): DnsConfig config = ValidConfigWithDoh(false /* doh_only */);
            Kenichi Ishibashi . unresolved

            nit: `/*doh_only=*/false`. Ditto below.

            Line 394, Patchset 30 (Latest): // Note: Current implementation of ShouldPerformDohFallbackUpgrade has a bug
            // that prevents fallback from being added if the initial upgrade results in
            // an empty config. Updating test to match current behavior.
            Kenichi Ishibashi . unresolved

            I'm uncertain about this comment. Do we need to fix ShouldPerformDohFallbackUpgrade, or should we update this test?

            Either way, I'm not very comfortable just modifying this test. We probably need to fix the bug first (or at least file an issue and put TODO comment with the issue number)?

            File net/dns/dns_test_util.h
            Line 384, Patchset 30 (Latest): class MockTransaction;
            Kenichi Ishibashi . unresolved

            nit: Put Forward class declaration after `public:`.

            File net/dns/host_resolver.cc
            Line 384, Patchset 30 (Latest): NOTREACHED();
            Kenichi Ishibashi . unresolved

            nit: Nice to have a comment similar to GetContextForTesting().

            File net/dns/mock_host_resolver.h
            Line 410, Patchset 30 (Latest): void SetResolveContextForTesting(ResolveContext* resolve_context) {
            resolve_context_ = resolve_context;
            }
            Kenichi Ishibashi . unresolved

            nit: We usually prefer putting `*ForTesting()` methods after non `*ForTesting()` methods.

            Line 410, Patchset 30 (Latest): void SetResolveContextForTesting(ResolveContext* resolve_context) {
            Kenichi Ishibashi . unresolved

            Might want to pass `base::SafeRef<ResolveContext>` directly since we call GetSafeRef() on this?

            File net/dns/resolve_context.h
            Line 249, Patchset 30 (Latest): void set_doh_fallback_canary_domain_check_status(CanaryDomainCheckStatus status) {
            Kenichi Ishibashi . resolved

            nit: Is this correctly formatted?

            Line 237, Patchset 30 (Latest): kNotStarted,
            Kenichi Ishibashi . unresolved

            Probably `kUnknown` might be better since we could reset the status to this value when OnDohServerUnavailable() is called?

            Line 235, Patchset 30 (Latest): enum class CanaryDomainCheckStatus {
            Kenichi Ishibashi . unresolved

            nit: Put enum declaration before methods/constructors (see other comment)

            File services/network/network_context_unittest.cc
            Line 5521, Patchset 30 (Latest): {{"canary_domain_host", "positive.test"}});
            Kenichi Ishibashi . unresolved

            Please separate tests for positive and negative cases. Having separate tests is useful which case actually works or fails when running tests.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Andrew Williams
            • Brian Begnoche
            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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
              Gerrit-Change-Number: 7509892
              Gerrit-PatchSet: 30
              Gerrit-Owner: Brian Begnoche <b...@chromium.org>
              Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
              Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
              Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
              Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
              Gerrit-CC: David Schinazi <dsch...@chromium.org>
              Gerrit-Attention: Brian Begnoche <b...@chromium.org>
              Gerrit-Attention: Andrew Williams <awi...@chromium.org>
              Gerrit-Comment-Date: Thu, 19 Feb 2026 07:24:33 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              satisfied_requirement
              unsatisfied_requirement
              open
              diffy

              Brian Begnoche (Gerrit)

              unread,
              Feb 19, 2026, 12:20:27 PM (12 days ago) Feb 19
              to David Schinazi, Chromium LUCI CQ, Kenichi Ishibashi, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
              Attention needed from Andrew Williams and Kenichi Ishibashi

              Brian Begnoche added 15 comments

              File net/dns/canary_domain_service_unittest.cc
              Line 59, Patchset 30: base::RunLoop().RunUntilIdle();
              Kenichi Ishibashi . resolved

              We shouldn't use RunUntilIdle() in new tests since it's one of major sources of flakiness.

              Instead, we probably want to add SetSecureDnsProbeCompleteCallbackForTesting() to CanaryDomainService, in a way similar to https://source.chromium.org/chromium/chromium/src/+/main:net/http/http_stream_pool_test_util.cc;l=438;drc=21d7e84d240f65df7594e5f3526d63e4439dd356

              (I don't think we need an extra PostTask in the callback for these tests)

              Brian Begnoche

              Done

              Line 158, Patchset 30: base::RunLoop().RunUntilIdle();
              Kenichi Ishibashi . resolved

              Ditto.

              Brian Begnoche

              Done

              File net/dns/dns_client.cc
              Line 94, Patchset 30: config.dns_over_tls_hostname)))) {
              Kenichi Ishibashi . resolved

              Q: Do we support DoT? I'm not aware of DoT support and I'm wondering why we need to check it.

              Brian Begnoche

              Apparently, yes:

              https://source.chromium.org/chromium/chromium/src/+/main:net/dns/dns_client.cc;l=78;drc=2f853cacd7a67069cde527e2bf02b6af1f1ee006

              I only see that that histogram is logged for Android, which is consistent with the comment there. I suspect that net/dns/dns_config_service_android.h is the only thing that sets this config value.

              In any case, here I want to maintain that if any nameserver has already been copied to `doh_coonfig`, then this should return false.

              Please re-open if I got something wrong, or if there is still follow up needed.

              Line 213, Patchset 30: enum class FallbackFromSecureTransactionPreferredReason {
              Kenichi Ishibashi . resolved

              nit: We prefer putting enum declarations before methods/constructors.

              https://google.github.io/styleguide/cppguide.html#Declaration_Order

              Brian Begnoche

              Done

              File net/dns/dns_client_unittest.cc
              Line 269, Patchset 30:TEST_F(DnsClientTest, FallbackFromSecureTransactionPreferred_Failures) {
              Kenichi Ishibashi . resolved

              Does this mean the previous name was wrong?

              Brian Begnoche

              Yes, actually. It is testing the `FallbackFromSecureTransactionPreferred` method.

              The source of the confusion or perhaps how it was misnamed could be that things evolved. Maybe this other method used to exist. But what I suspect is that the term "fallback" is overloaded in a confusing way. It can be used for DoH fallback, which refers to using Google DNS when the system config DNS doesn't support DoH. In contrast, this `FallbackFromSecureTransactionPreferred` method uses "fallback" to mean not allowing Secure DNS even though the config specifies values to do so.

              That is to say, yes, this method is testing behavior around "fallback" with the meaning of reverting back *from* configured Secure DNS to actually using insecure DNS.

              Line 311, Patchset 30: DnsConfig config = ValidConfigWithDoh(false /* doh_only */);
              Kenichi Ishibashi . resolved

              nit: `/*doh_only=*/false`. Ditto below.

              Brian Begnoche

              Done

              Line 394, Patchset 30: // Note: Current implementation of ShouldPerformDohFallbackUpgrade has a bug

              // that prevents fallback from being added if the initial upgrade results in
              // an empty config. Updating test to match current behavior.
              Kenichi Ishibashi . resolved

              I'm uncertain about this comment. Do we need to fix ShouldPerformDohFallbackUpgrade, or should we update this test?

              Either way, I'm not very comfortable just modifying this test. We probably need to fix the bug first (or at least file an issue and put TODO comment with the issue number)?

              Brian Begnoche

              Ah. This was Gemini off the rails at one point, and I missed that this comment had leaked in. I thought I had undone that bad detour.

              Note that this test wasn't actually changed meaningfully, and I've reverted these changes.

              File net/dns/dns_test_util.h
              Line 384, Patchset 30: class MockTransaction;
              Kenichi Ishibashi . resolved

              nit: Put Forward class declaration after `public:`.

              Brian Begnoche

              Done

              File net/dns/host_resolver.cc
              Line 384, Patchset 30: NOTREACHED();
              Kenichi Ishibashi . resolved

              nit: Nice to have a comment similar to GetContextForTesting().

              Brian Begnoche

              Done

              File net/dns/mock_host_resolver.h
              Line 410, Patchset 30: void SetResolveContextForTesting(ResolveContext* resolve_context) {
              resolve_context_ = resolve_context;
              }
              Kenichi Ishibashi . resolved

              nit: We usually prefer putting `*ForTesting()` methods after non `*ForTesting()` methods.

              Brian Begnoche

              Done.

              I will note also that perhaps the `ForTesting` suffix is redundant. I'm not sure what the best practice is, but the entirety of a mock is for testing.

              Line 410, Patchset 30: void SetResolveContextForTesting(ResolveContext* resolve_context) {
              Kenichi Ishibashi . resolved

              Might want to pass `base::SafeRef<ResolveContext>` directly since we call GetSafeRef() on this?

              Brian Begnoche

              I think that SafeRef doesn't make sense. `resolve_context_ would need to be set in the constructor, whereas this is only needed in combination with `CreateCanaryDomainService`.

              I could see passing a `unique_ptr<ResolveContext>` instead and taking ownership. In the spots where this is used (network_context_unittest.cc), that would require the pattern of creating a unique pointer, getting a raw pointer, passing ownership, then accessing via the raw pointer. I'm disinclined to do that in the absence of more reason, but please do re-open if that is more appropriate.

              File net/dns/resolve_context.h
              Line 237, Patchset 30: kNotStarted,
              Kenichi Ishibashi . resolved

              Probably `kUnknown` might be better since we could reset the status to this value when OnDohServerUnavailable() is called?

              Brian Begnoche

              I still think that `kNotStarted` makes more sense. Resetting the status is resetting back to a not started state, and this is a known state, both to start and after reset.

              I could see a case for having both `kUnknown` and `kNotStarted`, if there was a need for when this enum isn't set to something meaningful, but I don't think that need actually exists in this case.

              Well, I guess it makes sense for the case where the canary domain check isn't enabled at all. So OK, I've *added* `kUnknown`, but I've changed `CanaryDomainService::ProbeSecureDnsDomain` to set the status to `kStarted`. (I think it was incorrect that it set the status to `kNotStarted`.) See added comments there.

              Line 235, Patchset 30: enum class CanaryDomainCheckStatus {
              Kenichi Ishibashi . resolved

              nit: Put enum declaration before methods/constructors (see other comment)

              Brian Begnoche

              Done

              File services/network/network_context_unittest.cc
              Line 5521, Patchset 30: {{"canary_domain_host", "positive.test"}});
              Kenichi Ishibashi . resolved

              Please separate tests for positive and negative cases. Having separate tests is useful which case actually works or fails when running tests.

              Brian Begnoche

              Done

              Line 5521, Patchset 30: {{"canary_domain_host", "positive.test"}});
              Kenichi Ishibashi . resolved

              Please separate tests for positive and negative cases. Having separate tests is useful which case actually works or fails when running tests.

              Brian Begnoche

              Done

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Andrew Williams
              • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                Gerrit-Change-Number: 7509892
                Gerrit-PatchSet: 31
                Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                Gerrit-CC: David Schinazi <dsch...@chromium.org>
                Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
                Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                Gerrit-Comment-Date: Thu, 19 Feb 2026 17:20:22 +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,
                Feb 20, 2026, 2:42:03 AM (11 days ago) Feb 20
                to Brian Begnoche, David Schinazi, Chromium LUCI CQ, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                Attention needed from Andrew Williams and Brian Begnoche

                Kenichi Ishibashi added 5 comments

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

                Looking good! Before signing off, I want to check the flakiness (https://ci.chromium.org/ui/p/chromium/builders/try/android-x64-rel/807223/overview) is a noise or it's actually flaky.

                My experience is that the flakiness detector actually detects test flakiness.

                File net/dns/canary_domain_service.cc
                Line 124, Patchset 32 (Latest): // If the resolution completes synchronously (unlikely for uncached DNS),
                Kenichi Ishibashi . unresolved

                I'm not 100% sure it's unlikely that the resolution completes synchronously. For example, if the canary domain host is present in /etc/hosts (or equivalent), Start() could complete synchronously.

                So I think it's good to remove the comment and add a test to cover the path.

                File net/dns/canary_domain_service_unittest.cc
                Line 59, Patchset 32 (Latest): base::RunLoop().RunUntilIdle();
                Kenichi Ishibashi . unresolved

                Why do we need this? Probably remove RunProbe() entirely?

                File net/dns/dns_client.cc
                Line 229, Patchset 32 (Latest): bool FallbackFromSecureTransactionPreferred(
                Kenichi Ishibashi . unresolved

                awillia@: Does this change looks reasonable to you? Just want to confirm.

                File net/dns/mock_host_resolver.h
                Line 410, Patchset 30: void SetResolveContextForTesting(ResolveContext* resolve_context) {
                resolve_context_ = resolve_context;
                }
                Kenichi Ishibashi . resolved

                nit: We usually prefer putting `*ForTesting()` methods after non `*ForTesting()` methods.

                Brian Begnoche

                Done.

                I will note also that perhaps the `ForTesting` suffix is redundant. I'm not sure what the best practice is, but the entirety of a mock is for testing.

                Kenichi Ishibashi

                Usually we start with `ForTesting` suffix if the method is only called from tests. We can remove the suffix if we use the method in prod code.

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Andrew Williams
                • Brian Begnoche
                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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                  Gerrit-Change-Number: 7509892
                  Gerrit-PatchSet: 32
                  Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                  Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                  Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                  Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                  Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                  Gerrit-CC: David Schinazi <dsch...@chromium.org>
                  Gerrit-CC: Varun Khaneja <va...@chromium.org>
                  Gerrit-Attention: Brian Begnoche <b...@chromium.org>
                  Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                  Gerrit-Comment-Date: Fri, 20 Feb 2026 07:41:33 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Brian Begnoche (Gerrit)

                  unread,
                  Feb 20, 2026, 12:33:06 PM (11 days ago) Feb 20
                  to David Schinazi, Chromium LUCI CQ, Kenichi Ishibashi, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                  Attention needed from Andrew Williams and Kenichi Ishibashi

                  Brian Begnoche added 4 comments

                  File net/dns/canary_domain_service.cc
                  Line 124, Patchset 32: // If the resolution completes synchronously (unlikely for uncached DNS),
                  Kenichi Ishibashi . resolved

                  I'm not 100% sure it's unlikely that the resolution completes synchronously. For example, if the canary domain host is present in /etc/hosts (or equivalent), Start() could complete synchronously.

                  So I think it's good to remove the comment and add a test to cover the path.

                  Brian Begnoche

                  I've parameterized CanaryDomainServiceTest so that every test case is tested with and without synchronous mode. Synchronous mode tests the case that hits line 127 here.

                  Line 124, Patchset 32: // If the resolution completes synchronously (unlikely for uncached DNS),
                  Kenichi Ishibashi . resolved

                  I'm not 100% sure it's unlikely that the resolution completes synchronously. For example, if the canary domain host is present in /etc/hosts (or equivalent), Start() could complete synchronously.

                  So I think it's good to remove the comment and add a test to cover the path.

                  Brian Begnoche

                  Done

                  File net/dns/canary_domain_service_unittest.cc
                  Line 59, Patchset 32: base::RunLoop().RunUntilIdle();
                  Kenichi Ishibashi . resolved

                  Why do we need this? Probably remove RunProbe() entirely?

                  Brian Begnoche

                  Yes, removed. I just forgot to remove it.

                  File net/dns/mock_host_resolver.h
                  Line 410, Patchset 30: void SetResolveContextForTesting(ResolveContext* resolve_context) {
                  resolve_context_ = resolve_context;
                  }
                  Kenichi Ishibashi . resolved

                  nit: We usually prefer putting `*ForTesting()` methods after non `*ForTesting()` methods.

                  Brian Begnoche

                  Done.

                  I will note also that perhaps the `ForTesting` suffix is redundant. I'm not sure what the best practice is, but the entirety of a mock is for testing.

                  Kenichi Ishibashi

                  Usually we start with `ForTesting` suffix if the method is only called from tests. We can remove the suffix if we use the method in prod code.

                  Brian Begnoche

                  Ack. This is my understanding too.

                  My point is that a mock is never called in prod.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Andrew Williams
                  • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                  Gerrit-Change-Number: 7509892
                  Gerrit-PatchSet: 33
                  Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                  Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                  Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                  Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                  Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                  Gerrit-CC: David Schinazi <dsch...@chromium.org>
                  Gerrit-CC: Varun Khaneja <va...@chromium.org>
                  Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
                  Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                  Gerrit-Comment-Date: Fri, 20 Feb 2026 17:32:59 +0000
                  satisfied_requirement
                  unsatisfied_requirement
                  open
                  diffy

                  Brian Begnoche (Gerrit)

                  unread,
                  Feb 20, 2026, 1:38:45 PM (11 days ago) Feb 20
                  to David Schinazi, Chromium LUCI CQ, Kenichi Ishibashi, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                  Attention needed from Andrew Williams and Kenichi Ishibashi

                  Brian Begnoche added 1 comment

                  Patchset-level comments
                  Kenichi Ishibashi . resolved

                  Looking good! Before signing off, I want to check the flakiness (https://ci.chromium.org/ui/p/chromium/builders/try/android-x64-rel/807223/overview) is a noise or it's actually flaky.

                  My experience is that the flakiness detector actually detects test flakiness.

                  Brian Begnoche

                  FYI that appears to be an overall flakiness issue with net_unittests. I see loads of tests in log search that have this failure occasionally.

                  [0219/181837.682407:FATAL:net/test/net_test_suite.cc:56] DCHECK failed: !g_current_net_test_suite.

                  I'm rerunning commit queue (dry) and rerunning checks, and I will continue to look at this if it persists.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Andrew Williams
                  • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                  Gerrit-Change-Number: 7509892
                  Gerrit-PatchSet: 34
                  Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                  Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                  Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                  Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                  Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                  Gerrit-CC: David Schinazi <dsch...@chromium.org>
                  Gerrit-CC: Varun Khaneja <va...@chromium.org>
                  Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
                  Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                  Gerrit-Comment-Date: Fri, 20 Feb 2026 18:38:40 +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,
                  Feb 20, 2026, 6:06:40 PM (11 days ago) Feb 20
                  to Brian Begnoche, David Schinazi, Chromium LUCI CQ, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                  Attention needed from Andrew Williams and Brian Begnoche

                  Kenichi Ishibashi voted and added 2 comments

                  Votes added by Kenichi Ishibashi

                  Code-Review+1

                  2 comments

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

                  lgtm on my side (except for comment on FallbackFromSecureTransactionPreferred), thanks!

                  File net/dns/canary_domain_service.h
                  Line 63, Patchset 34 (Latest): void SetOnProbeCompleteCallbackForTesting(base::RepeatingClosure callback);
                  Kenichi Ishibashi . unresolved

                  nit: Sorry I missed this before, but why is this RepeatingClosure instead of OnceClosure? We prefer OnceClosure if the callback is called only once.

                  Open in Gerrit

                  Related details

                  Attention is currently required from:
                  • Andrew Williams
                  • Brian Begnoche
                  Submit Requirements:
                    • requirement satisfiedCode-Coverage
                    • requirement is not satisfiedCode-Owners
                    • requirement satisfiedCode-Review
                    • requirement is not satisfiedNo-Unresolved-Comments
                    • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                    Gerrit-Change-Number: 7509892
                    Gerrit-PatchSet: 34
                    Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                    Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                    Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                    Gerrit-CC: David Schinazi <dsch...@chromium.org>
                    Gerrit-CC: Varun Khaneja <va...@chromium.org>
                    Gerrit-Attention: Brian Begnoche <b...@chromium.org>
                    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                    Gerrit-Comment-Date: Fri, 20 Feb 2026 23:06:04 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: Yes
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Andrew Williams (Gerrit)

                    unread,
                    Feb 21, 2026, 12:47:16 AM (10 days ago) Feb 21
                    to Brian Begnoche, Kenichi Ishibashi, David Schinazi, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                    Attention needed from Brian Begnoche

                    Andrew Williams added 25 comments

                    Patchset-level comments
                    Andrew Williams . resolved

                    I think this looks good overall, but leaving some remaining feedback, questions, and comments. Thanks Brian, so close!

                    Commit Message
                    Line 13, Patchset 34 (Latest):* `DnsClient::FallbackFromSecureTransactionPreferred` is updated so that both at least one available DoH server *and* a positive canary domain result are needed to allow Secure DNS (return false).
                    Andrew Williams . unresolved

                    nit: wrap long lines (Gerrit can do this automatically if you click Edit -> Format) and also update this to say something like "are needed to allow Secure DNS to the fallback provider)"

                    File net/base/features.h
                    Line 761, Patchset 34 (Latest):// When enabled, upon reading a new DNS config that enables Secure DNS, the
                    Andrew Williams . unresolved

                    nit: maybe update this to reflect that the canary domain check will be sent when probes are sent

                    File net/dns/canary_domain_service.cc
                    Line 39, Patchset 34 (Latest): params.cache_usage =
                    Andrew Williams . unresolved

                    optional: it might be useful to have a test demonstrating that the canary domain checks aren't cached / get re-issued when the network changes.

                    Line 49, Patchset 34 (Latest): const HostResolver::ResolveHostRequest* request,
                    Andrew Williams . unresolved

                    nit: can use a const reference here instead and then remove the `DCHECK(request)`

                    https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs

                    Line 95, Patchset 34 (Latest): // Reset any previous result. Secure DNS should only be allowed if a new probe
                    Andrew Williams . unresolved

                    nit: "Secure DNS to the fallback provider should only be allowed"

                    Line 117, Patchset 34 (Latest): std::move(host_port_pair), NetworkAnonymizationKey::CreateTransient(),
                    Andrew Williams . unresolved

                    nit: this version of CreateRequest takes a const reference for the first parameter, so no need to std::move here. Since we only ever create a HostPortPair with this member, we could create the HostPortPair in the constructor and store that instead.

                    Line 122, Patchset 34 (Latest): weak_ptr_factory_.GetWeakPtr()));
                    Andrew Williams . unresolved

                    since we own pending_probe_request_ we can use base::Unretained(this) here instead of needing to use a weak pointer (and could get rid of this classes WeakPtrFactory then, I think)

                    Line 133, Patchset 34 (Latest): if (!probe_request) {
                    Andrew Williams . unresolved

                    Is this case still possible? it seems like it isn't, because if pending_probe_request_ is destroyed then the provided callback won't be called

                    https://source.chromium.org/chromium/chromium/src/+/main:net/dns/host_resolver.h;l=125;drc=d209eefee6037bd0905e43f88570fda8edab89a1

                    If this case is possible we may want to consider calling set_doh_fallback_canary_domain_check_status so the status doesn't remain kStarted, and ideally we'd have a test.

                    Line 143, Patchset 34 (Latest): if (net_error != net::ERR_ABORTED) {
                    Andrew Williams . unresolved

                    is ERR_ABORTED possible here? There was a comment elsewhere that "HostResolver squashes ERR_ABORTED to ERR_NAME_NOT_RESOLVED.". If it is possible, it seems like it'd still be better to call set_doh_fallback_canary_domain_check_status so that the status isn't kStarted?

                    Line 151, Patchset 34 (Latest): base::StrCat({"Net.DNS.CanaryDomainService.SecureDns.Result"}), result);
                    Andrew Williams . unresolved

                    can remove base::StrCat here (and above if we keep that code)

                    Line 153, Patchset 34 (Latest): if (on_probe_complete_callback_for_testing_) {
                    Andrew Williams . unresolved

                    If we keep the if `if (!probe_request)` block above we may want to consider whether this should be called before the return there for consistency given the name

                    File net/dns/context_host_resolver.h
                    Line 83, Patchset 34 (Latest):
                    Andrew Williams . unresolved

                    nit: remove new line since these are all part of the same interface

                    File net/dns/dns_client.h
                    Line 99, Patchset 34 (Latest): // conditions. See SetSecureDnsAllowedByCanaryDomain().
                    Andrew Williams . unresolved

                    nit: update `SetSecureDnsAllowedByCanaryDomain` to the new name

                    File net/dns/dns_client.cc
                    Line 44, Patchset 34 (Latest):// LINT.IfChange(FallbackFromSecureTransactionPreferredReason)
                    Andrew Williams . unresolved

                    nit: we should add the header comment about these being logged to histograms:

                    https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md#requirements

                    Line 94, Patchset 30: config.dns_over_tls_hostname)))) {
                    Kenichi Ishibashi . resolved

                    Q: Do we support DoT? I'm not aware of DoT support and I'm wondering why we need to check it.

                    Brian Begnoche

                    Apparently, yes:

                    https://source.chromium.org/chromium/chromium/src/+/main:net/dns/dns_client.cc;l=78;drc=2f853cacd7a67069cde527e2bf02b6af1f1ee006

                    I only see that that histogram is logged for Android, which is consistent with the comment there. I suspect that net/dns/dns_config_service_android.h is the only thing that sets this config value.

                    In any case, here I want to maintain that if any nameserver has already been copied to `doh_coonfig`, then this should return false.

                    Please re-open if I got something wrong, or if there is still follow up needed.

                    Andrew Williams

                    We don't support use of DoT, but for Android we do support checking whether the system is configured to use DoT and if so, we use the DoT server hostname to determine whether we have a corresponding entry in our DoH provider list so we can use DoH. I looked into how this worked a few years ago and IIRC it was related to this: https://developer.android.com/reference/android/net/LinkProperties.html#isPrivateDnsActive()

                    Line 105, Patchset 34 (Latest): config.dns_over_tls_hostname)))) {
                    Andrew Williams . unresolved

                    Looking again at how UpdateConfigForDohUpgrade is implemented, we don't attempt the fallback at all unless config.dns_over_tls_hostname is empty...

                    If we keep this separate logic instead of using a boolean, I think it'd be better for consistency and simplicity if we replace `config.doh_config == DnsOverHttpsConfig(GetDohUpgradeServersFromDotHostname(config.dns_over_tls_hostname))` with a `if (!config->dns_over_tls_hostname.empty()) { return false }` check instead

                    Line 105, Patchset 34 (Latest): config.dns_over_tls_hostname)))) {
                    Andrew Williams . unresolved

                    Following up on the conversation from: https://chromium-review.googlesource.com/c/chromium/src/+/7567908/comment/b954f680_c90ed469/

                    I can see your point about not wanting the DnsConfig to contain metadata about how it was constructed, but if we added a new boolean named something like `should_perform_doh_fallback_upgrade` (and set it to true when doh_config corresponds to the fallback provider DoH config) I think it would feel more like a configuration option than metadata, and then we could use that in FallbackFromSecureTransactionPreferred more simply instead.

                    I don't think I realized exactly how complex the logic in UpdateConfigForDohUpgrade is and that we'd have to replicate each piece of that in this function as well. I think having to mirror the two is more error prone and possible to break over time than just using the boolean approach. Something to consider (I know, I know, thinking through how best to implement all this has already required way too much brainpower!)

                    Line 229, Patchset 32: bool FallbackFromSecureTransactionPreferred(
                    Kenichi Ishibashi . resolved

                    awillia@: Does this change looks reasonable to you? Just want to confirm.

                    Andrew Williams

                    yeah this new logic LGTM, with some thoughts in other comments about whether using a boolean in DnsConfig instead of ShouldPerformDohFallbackUpgrade might be worthwhile. thanks!

                    File net/dns/dns_test_util.h
                    Line 386, Patchset 34 (Latest): const std::vector<base::WeakPtr<MockTransaction>>& delayed_transactions()
                    Andrew Williams . unresolved

                    Are the changes to this file still needed? I don't see where delayed_transactions() is called

                    File net/dns/mock_host_resolver.h
                    Line 410, Patchset 34 (Latest): std::unique_ptr<CanaryDomainService> CreateCanaryDomainService() override;
                    Andrew Williams . unresolved

                    nit: move into the "// HostResolver methods:" section above

                    File services/network/network_context_unittest.cc
                    Line 5516, Patchset 34 (Latest):TEST_F(NetworkContextTest, CanaryDomainServiceProbe_PositiveResult) {
                    Andrew Williams . unresolved

                    optional: could combine this and the test below into one parameterized test (actually I've found Gemini pretty good at doing this type of thing)

                    Line 5527, Patchset 34 (Latest): net::ResolveContext resolve_context(nullptr, false);
                    Andrew Williams . unresolved
                    nit: 
                    ```suggestion
                    net::ResolveContext resolve_context(/*url_request_context=*/nullptr, /*enable_caching=*/false);
                    ```

                    here and below

                    Line 5612, Patchset 34 (Latest): auto* mock_resolver = static_cast<net::MockHostResolverBase*>(
                    Andrew Williams . unresolved

                    Do we need these four lines (and resolve_context created above) for this test?

                    File tools/metrics/histograms/metadata/net/enums.xml
                    Line 152, Patchset 34 (Latest):<!-- LINT.ThenChange(/net/dns/canary_domain_service.cc:CanaryDomainResult) -->
                    Andrew Williams . unresolved

                    nit (thanks Gemini):
                    ```suggestion
                    <!-- LINT.ThenChange(/net/dns/canary_domain_service.h:CanaryDomainResult) -->
                    ```

                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Brian Begnoche
                    Gerrit-Comment-Date: Sat, 21 Feb 2026 05:47:09 +0000
                    Gerrit-HasComments: Yes
                    Gerrit-Has-Labels: No
                    satisfied_requirement
                    unsatisfied_requirement
                    open
                    diffy

                    Brian Begnoche (Gerrit)

                    unread,
                    Feb 23, 2026, 3:22:17 PM (8 days ago) Feb 23
                    to Kenichi Ishibashi, David Schinazi, Chromium LUCI CQ, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                    Attention needed from Andrew Williams and Kenichi Ishibashi

                    Brian Begnoche added 24 comments

                    Commit Message
                    Line 13, Patchset 34:* `DnsClient::FallbackFromSecureTransactionPreferred` is updated so that both at least one available DoH server *and* a positive canary domain result are needed to allow Secure DNS (return false).
                    Andrew Williams . resolved

                    nit: wrap long lines (Gerrit can do this automatically if you click Edit -> Format) and also update this to say something like "are needed to allow Secure DNS to the fallback provider)"

                    Brian Begnoche

                    Done

                    File net/base/features.h
                    Line 761, Patchset 34:// When enabled, upon reading a new DNS config that enables Secure DNS, the
                    Andrew Williams . resolved

                    nit: maybe update this to reflect that the canary domain check will be sent when probes are sent

                    Brian Begnoche

                    Done

                    File net/dns/canary_domain_service.h
                    Line 63, Patchset 34: void SetOnProbeCompleteCallbackForTesting(base::RepeatingClosure callback);
                    Kenichi Ishibashi . resolved

                    nit: Sorry I missed this before, but why is this RepeatingClosure instead of OnceClosure? We prefer OnceClosure if the callback is called only once.

                    Brian Begnoche

                    Done

                    File net/dns/canary_domain_service.cc
                    Line 39, Patchset 34: params.cache_usage =
                    Andrew Williams . resolved

                    optional: it might be useful to have a test demonstrating that the canary domain checks aren't cached / get re-issued when the network changes.

                    Brian Begnoche

                    Added a test.

                    Line 49, Patchset 34: const HostResolver::ResolveHostRequest* request,
                    Andrew Williams . resolved

                    nit: can use a const reference here instead and then remove the `DCHECK(request)`

                    https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs

                    Brian Begnoche

                    Done

                    Line 95, Patchset 34: // Reset any previous result. Secure DNS should only be allowed if a new probe
                    Andrew Williams . resolved

                    nit: "Secure DNS to the fallback provider should only be allowed"

                    Brian Begnoche

                    Done

                    Line 95, Patchset 34: // Reset any previous result. Secure DNS should only be allowed if a new probe
                    Andrew Williams . resolved

                    nit: "Secure DNS to the fallback provider should only be allowed"

                    Brian Begnoche

                    Done

                    Line 117, Patchset 34: std::move(host_port_pair), NetworkAnonymizationKey::CreateTransient(),
                    Andrew Williams . resolved

                    nit: this version of CreateRequest takes a const reference for the first parameter, so no need to std::move here. Since we only ever create a HostPortPair with this member, we could create the HostPortPair in the constructor and store that instead.

                    Brian Begnoche

                    Done

                    Line 122, Patchset 34: weak_ptr_factory_.GetWeakPtr()));
                    Andrew Williams . resolved

                    since we own pending_probe_request_ we can use base::Unretained(this) here instead of needing to use a weak pointer (and could get rid of this classes WeakPtrFactory then, I think)

                    Brian Begnoche

                    Done

                    Line 133, Patchset 34: if (!probe_request) {
                    Andrew Williams . resolved

                    Is this case still possible? it seems like it isn't, because if pending_probe_request_ is destroyed then the provided callback won't be called

                    https://source.chromium.org/chromium/chromium/src/+/main:net/dns/host_resolver.h;l=125;drc=d209eefee6037bd0905e43f88570fda8edab89a1

                    If this case is possible we may want to consider calling set_doh_fallback_canary_domain_check_status so the status doesn't remain kStarted, and ideally we'd have a test.

                    Brian Begnoche

                    I think you're right. I've removed it.

                    The only possibility I would see is on a sync result (ERR_IO_PENDING) that short-circuits straight to this callback and there's a race condition with another call of ProbeSecureDomain that destroys pending_probe_request. But I think that's not a concern since these events are all executed on the same network thread.

                    Line 143, Patchset 34: if (net_error != net::ERR_ABORTED) {
                    Andrew Williams . resolved

                    is ERR_ABORTED possible here? There was a comment elsewhere that "HostResolver squashes ERR_ABORTED to ERR_NAME_NOT_RESOLVED.". If it is possible, it seems like it'd still be better to call set_doh_fallback_canary_domain_check_status so that the status isn't kStarted?

                    Brian Begnoche

                    MockHostResolver squashes it. I updated the comment.

                    Basically I want to test this case, but MockHostResolver's behavior makes it impossible, IIUC. It doesn't seem worth mucking with it, but I did leave the tests that I would like to have in place. Maybe they're more confusing than they're worth.

                    But actually, thinking about this more now, I don't think the specific check for ERR_ABORTED is needed. It was in the initial attempt where only a negative result disabled DoH. Now that this needs a positive result to enable DoH, I think it's OK for ERR_ABORTED to be treated like any other error and report the result via callback.

                    I've removed this block entirely and removed the tests. Please re-open if you disagree.

                    Line 151, Patchset 34: base::StrCat({"Net.DNS.CanaryDomainService.SecureDns.Result"}), result);
                    Andrew Williams . resolved

                    can remove base::StrCat here (and above if we keep that code)

                    Brian Begnoche

                    Done

                    Line 153, Patchset 34: if (on_probe_complete_callback_for_testing_) {
                    Andrew Williams . resolved

                    If we keep the if `if (!probe_request)` block above we may want to consider whether this should be called before the return there for consistency given the name

                    Brian Begnoche

                    I removed that if block.

                    File net/dns/context_host_resolver.h
                    Line 83, Patchset 34:
                    Andrew Williams . resolved

                    nit: remove new line since these are all part of the same interface

                    Brian Begnoche

                    Done

                    File net/dns/dns_client.h
                    Line 99, Patchset 34: // conditions. See SetSecureDnsAllowedByCanaryDomain().
                    Andrew Williams . resolved

                    nit: update `SetSecureDnsAllowedByCanaryDomain` to the new name

                    Brian Begnoche

                    This addition actually no longer makes sense since this added method doesn't exist anymore, and the canary domain doesn't affect the effective config that's returned.

                    Removed these added sentences entirely.

                    File net/dns/dns_client.cc
                    Line 44, Patchset 34:// LINT.IfChange(FallbackFromSecureTransactionPreferredReason)
                    Andrew Williams . resolved

                    nit: we should add the header comment about these being logged to histograms:

                    https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md#requirements

                    Brian Begnoche

                    Done

                    Line 105, Patchset 34: config.dns_over_tls_hostname)))) {
                    Andrew Williams . resolved

                    Following up on the conversation from: https://chromium-review.googlesource.com/c/chromium/src/+/7567908/comment/b954f680_c90ed469/

                    I can see your point about not wanting the DnsConfig to contain metadata about how it was constructed, but if we added a new boolean named something like `should_perform_doh_fallback_upgrade` (and set it to true when doh_config corresponds to the fallback provider DoH config) I think it would feel more like a configuration option than metadata, and then we could use that in FallbackFromSecureTransactionPreferred more simply instead.

                    I don't think I realized exactly how complex the logic in UpdateConfigForDohUpgrade is and that we'd have to replicate each piece of that in this function as well. I think having to mirror the two is more error prone and possible to break over time than just using the boolean approach. Something to consider (I know, I know, thinking through how best to implement all this has already required way too much brainpower!)

                    Brian Begnoche

                    OK, agreed, and done.

                    Line 105, Patchset 34: config.dns_over_tls_hostname)))) {
                    Andrew Williams . resolved

                    Looking again at how UpdateConfigForDohUpgrade is implemented, we don't attempt the fallback at all unless config.dns_over_tls_hostname is empty...

                    If we keep this separate logic instead of using a boolean, I think it'd be better for consistency and simplicity if we replace `config.doh_config == DnsOverHttpsConfig(GetDohUpgradeServersFromDotHostname(config.dns_over_tls_hostname))` with a `if (!config->dns_over_tls_hostname.empty()) { return false }` check instead

                    Brian Begnoche

                    I had to think about this, but yes, this makes sense. I added a comment as well. Please comment if that doesn't cover it sufficiently.

                    File net/dns/dns_test_util.h
                    Line 386, Patchset 34: const std::vector<base::WeakPtr<MockTransaction>>& delayed_transactions()
                    Andrew Williams . resolved

                    Are the changes to this file still needed? I don't see where delayed_transactions() is called

                    Brian Begnoche

                    No, I thought I reverted these. Should be reverted now.

                    File net/dns/mock_host_resolver.h
                    Line 410, Patchset 34: std::unique_ptr<CanaryDomainService> CreateCanaryDomainService() override;
                    Andrew Williams . resolved

                    nit: move into the "// HostResolver methods:" section above

                    Brian Begnoche

                    Done

                    File services/network/network_context_unittest.cc
                    Line 5516, Patchset 34:TEST_F(NetworkContextTest, CanaryDomainServiceProbe_PositiveResult) {
                    Andrew Williams . resolved

                    optional: could combine this and the test below into one parameterized test (actually I've found Gemini pretty good at doing this type of thing)

                    Brian Begnoche

                    Done

                    Line 5527, Patchset 34: net::ResolveContext resolve_context(nullptr, false);
                    Andrew Williams . resolved
                    nit: 
                    ```suggestion
                    net::ResolveContext resolve_context(/*url_request_context=*/nullptr, /*enable_caching=*/false);
                    ```

                    here and below

                    Brian Begnoche

                    Done

                    Line 5612, Patchset 34: auto* mock_resolver = static_cast<net::MockHostResolverBase*>(
                    Andrew Williams . resolved

                    Do we need these four lines (and resolve_context created above) for this test?

                    Brian Begnoche

                    No, thanks for the catch. Removed.

                    File tools/metrics/histograms/metadata/net/enums.xml
                    Line 152, Patchset 34:<!-- LINT.ThenChange(/net/dns/canary_domain_service.cc:CanaryDomainResult) -->
                    Andrew Williams . resolved

                    nit (thanks Gemini):
                    ```suggestion
                    <!-- LINT.ThenChange(/net/dns/canary_domain_service.h:CanaryDomainResult) -->
                    ```

                    Brian Begnoche

                    Done

                    Open in Gerrit

                    Related details

                    Attention is currently required from:
                    • Andrew Williams
                    • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                      Gerrit-Change-Number: 7509892
                      Gerrit-PatchSet: 35
                      Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                      Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                      Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                      Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                      Gerrit-CC: David Schinazi <dsch...@chromium.org>
                      Gerrit-CC: Varun Khaneja <va...@chromium.org>
                      Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
                      Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                      Gerrit-Comment-Date: Mon, 23 Feb 2026 20:22:07 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Brian Begnoche (Gerrit)

                      unread,
                      Feb 24, 2026, 9:53:08 AM (7 days ago) Feb 24
                      to David Schinazi, Kenichi Ishibashi, Chromium LUCI CQ, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                      Attention needed from Andrew Williams, David Schinazi and Kenichi Ishibashi

                      Brian Begnoche added 1 comment

                      Patchset-level comments
                      File-level comment, Patchset 35 (Latest):
                      Brian Begnoche . resolved

                      David, can you +1 for histogram changes?

                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Andrew Williams
                      • David Schinazi
                      • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                      Gerrit-Change-Number: 7509892
                      Gerrit-PatchSet: 35
                      Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                      Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                      Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                      Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                      Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                      Gerrit-CC: Varun Khaneja <va...@chromium.org>
                      Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
                      Gerrit-Attention: David Schinazi <dsch...@chromium.org>
                      Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                      Gerrit-Comment-Date: Tue, 24 Feb 2026 14:53:01 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Brian Begnoche (Gerrit)

                      unread,
                      Feb 24, 2026, 12:08:58 PM (7 days ago) Feb 24
                      to David Schinazi, Kenichi Ishibashi, Chromium LUCI CQ, Andrew Williams, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                      Attention needed from Andrew Williams, David Schinazi and Kenichi Ishibashi

                      Brian Begnoche added 1 comment

                      Patchset-level comments
                      Brian Begnoche . resolved

                      Kenichi-san, can you PTAL at dns_config.{h,cc} again and re-up your +1? Thank you.

                      Gerrit-Comment-Date: Tue, 24 Feb 2026 17:08:51 +0000
                      Gerrit-HasComments: Yes
                      Gerrit-Has-Labels: No
                      satisfied_requirement
                      unsatisfied_requirement
                      open
                      diffy

                      Andrew Williams (Gerrit)

                      unread,
                      Feb 24, 2026, 1:27:41 PM (7 days ago) Feb 24
                      to Brian Begnoche, David Schinazi, Kenichi Ishibashi, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                      Attention needed from Brian Begnoche, David Schinazi and Kenichi Ishibashi

                      Andrew Williams voted and added 2 comments

                      Votes added by Andrew Williams

                      Code-Review+1

                      2 comments

                      Patchset-level comments
                      Andrew Williams . resolved

                      LGTM with one final comment. Great work on this Brian!

                      File net/dns/canary_domain_service.cc
                      Line 118, Patchset 35 (Latest): &CanaryDomainService::OnSecureDnsProbeComplete, base::Unretained(this)));
                      Andrew Williams . unresolved

                      optional: it's recommended to add a comment above uses of base::Unretained regarding why it is safe (here because we own pending_probe_request_)

                      https://chromium.googlesource.com/chromium/src/+/HEAD/docs/callback.md#binding-a-class-method-with-manual-lifetime-management

                      Open in Gerrit

                      Related details

                      Attention is currently required from:
                      • Brian Begnoche
                      • David Schinazi
                      • Kenichi Ishibashi
                      Submit Requirements:
                        • requirement satisfiedCode-Coverage
                        • requirement is not satisfiedCode-Owners
                        • requirement satisfiedCode-Review
                        • requirement is not satisfiedNo-Unresolved-Comments
                        • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                        Gerrit-Change-Number: 7509892
                        Gerrit-PatchSet: 35
                        Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                        Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                        Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                        Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                        Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                        Gerrit-CC: Varun Khaneja <va...@chromium.org>
                        Gerrit-Attention: Brian Begnoche <b...@chromium.org>
                        Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
                        Gerrit-Attention: David Schinazi <dsch...@chromium.org>
                        Gerrit-Comment-Date: Tue, 24 Feb 2026 18:27:34 +0000
                        Gerrit-HasComments: Yes
                        Gerrit-Has-Labels: Yes
                        satisfied_requirement
                        unsatisfied_requirement
                        open
                        diffy

                        Brian Begnoche (Gerrit)

                        unread,
                        Feb 24, 2026, 2:15:28 PM (7 days ago) Feb 24
                        to Andrew Williams, David Schinazi, Kenichi Ishibashi, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                        Attention needed from David Schinazi and Kenichi Ishibashi

                        Brian Begnoche added 2 comments

                        File net/dns/canary_domain_service.cc
                        Line 118, Patchset 35 (Latest): &CanaryDomainService::OnSecureDnsProbeComplete, base::Unretained(this)));
                        Andrew Williams . resolved

                        optional: it's recommended to add a comment above uses of base::Unretained regarding why it is safe (here because we own pending_probe_request_)

                        https://chromium.googlesource.com/chromium/src/+/HEAD/docs/callback.md#binding-a-class-method-with-manual-lifetime-management

                        Brian Begnoche

                        Done

                        Line 118, Patchset 35 (Latest): &CanaryDomainService::OnSecureDnsProbeComplete, base::Unretained(this)));
                        Andrew Williams . resolved

                        optional: it's recommended to add a comment above uses of base::Unretained regarding why it is safe (here because we own pending_probe_request_)

                        https://chromium.googlesource.com/chromium/src/+/HEAD/docs/callback.md#binding-a-class-method-with-manual-lifetime-management

                        Brian Begnoche

                        Done

                        Open in Gerrit

                        Related details

                        Attention is currently required from:
                        • David Schinazi
                        • Kenichi Ishibashi
                        Submit Requirements:
                          • requirement satisfiedCode-Coverage
                          • requirement is not 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                          Gerrit-Change-Number: 7509892
                          Gerrit-PatchSet: 35
                          Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                          Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                          Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                          Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                          Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                          Gerrit-CC: Varun Khaneja <va...@chromium.org>
                          Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
                          Gerrit-Attention: David Schinazi <dsch...@chromium.org>
                          Gerrit-Comment-Date: Tue, 24 Feb 2026 19:15:16 +0000
                          Gerrit-HasComments: Yes
                          Gerrit-Has-Labels: No
                          Comment-In-Reply-To: Andrew Williams <awi...@chromium.org>
                          satisfied_requirement
                          unsatisfied_requirement
                          open
                          diffy

                          Brian Begnoche (Gerrit)

                          unread,
                          Feb 24, 2026, 5:42:01 PM (7 days ago) Feb 24
                          to Andrew Williams, David Schinazi, Kenichi Ishibashi, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                          Attention needed from David Schinazi and Kenichi Ishibashi

                          Brian Begnoche added 1 comment

                          File net/dns/canary_domain_service.cc
                          Line 110, Patchset 38 (Latest): base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
                          Brian Begnoche . unresolved

                          I've updated this to post a task. Without this, the DNS resolution can fail with `DNS_CACHE_INVALIDATION_IN_PROGRESS`. I discovered this while changing the Secure DNS setting in chrome://settings/security and seeing that the result when changing the setting was `DNS_CACHE_INVALIDATION_IN_PROGRESS` instead of the correct result. So I think this is resolved.

                          But I also notice that if I spam changes to the setting, sometimes there's a DCHECK failure here in `HostResolverManager::InvalidateCaches`. I'm not sure how to make it happen deterministically either.

                          `DCHECK_EQ(num_jobs, jobs_.size());`

                          https://source.chromium.org/chromium/chromium/src/+/main:net/dns/host_resolver_manager.cc;l=1813;drc=75bd37cd98d8654e740d5b267c1be6fbf81c6ede

                          Open in Gerrit

                          Related details

                          Attention is currently required from:
                          • David Schinazi
                          • Kenichi Ishibashi
                          Submit Requirements:
                            • requirement satisfiedCode-Coverage
                            • requirement is not satisfiedCode-Owners
                            • requirement satisfiedCode-Review
                            • requirement is not satisfiedNo-Unresolved-Comments
                            • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                            Gerrit-Change-Number: 7509892
                            Gerrit-PatchSet: 38
                            Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                            Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                            Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                            Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                            Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                            Gerrit-CC: Varun Khaneja <va...@chromium.org>
                            Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
                            Gerrit-Attention: David Schinazi <dsch...@chromium.org>
                            Gerrit-Comment-Date: Tue, 24 Feb 2026 22:41:53 +0000
                            Gerrit-HasComments: Yes
                            Gerrit-Has-Labels: No
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Kenichi Ishibashi (Gerrit)

                            unread,
                            Feb 24, 2026, 5:51:38 PM (7 days ago) Feb 24
                            to Brian Begnoche, Andrew Williams, David Schinazi, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                            Attention needed from Brian Begnoche and David Schinazi

                            Kenichi Ishibashi voted and added 2 comments

                            Votes added by Kenichi Ishibashi

                            Code-Review+1

                            2 comments

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

                            Stamp-ish lgtm to unblock, as I'm OOO today. I might take a closer look tomorrow.

                            File net/dns/canary_domain_service.cc
                            Line 110, Patchset 38 (Latest): base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
                            Brian Begnoche . unresolved

                            I've updated this to post a task. Without this, the DNS resolution can fail with `DNS_CACHE_INVALIDATION_IN_PROGRESS`. I discovered this while changing the Secure DNS setting in chrome://settings/security and seeing that the result when changing the setting was `DNS_CACHE_INVALIDATION_IN_PROGRESS` instead of the correct result. So I think this is resolved.

                            But I also notice that if I spam changes to the setting, sometimes there's a DCHECK failure here in `HostResolverManager::InvalidateCaches`. I'm not sure how to make it happen deterministically either.

                            `DCHECK_EQ(num_jobs, jobs_.size());`

                            https://source.chromium.org/chromium/chromium/src/+/main:net/dns/host_resolver_manager.cc;l=1813;drc=75bd37cd98d8654e740d5b267c1be6fbf81c6ede

                            Kenichi Ishibashi

                            Coincidentally, I was looking into the root cause (https://crbug.com/486443374). Here is Gemini's summary: https://paste.googleplex.com/5640716798787584
                            WIP CL: https://crrev.com/c/7601235

                            The proposed fix doesn't seem to work (e.g. break existing tests). I had a long conversation with gemini-cli. Still figuring out what's a better way to fix the issue.

                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • Brian Begnoche
                            • David Schinazi
                            Submit Requirements:
                            • requirement satisfiedCode-Coverage
                            • requirement is not satisfiedCode-Owners
                            • requirement satisfiedCode-Review
                            • requirement is not satisfiedNo-Unresolved-Comments
                            • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                            Gerrit-Change-Number: 7509892
                            Gerrit-PatchSet: 38
                            Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                            Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                            Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                            Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                            Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                            Gerrit-CC: Varun Khaneja <va...@chromium.org>
                            Gerrit-Attention: Brian Begnoche <b...@chromium.org>
                            Gerrit-Attention: David Schinazi <dsch...@chromium.org>
                            Gerrit-Comment-Date: Tue, 24 Feb 2026 22:50:59 +0000
                            Gerrit-HasComments: Yes
                            Gerrit-Has-Labels: Yes
                            Comment-In-Reply-To: Brian Begnoche <b...@chromium.org>
                            satisfied_requirement
                            unsatisfied_requirement
                            open
                            diffy

                            Brian Begnoche (Gerrit)

                            unread,
                            Feb 25, 2026, 9:09:41 AM (6 days ago) Feb 25
                            to Kenichi Ishibashi, Andrew Williams, David Schinazi, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                            Attention needed from David Schinazi

                            Brian Begnoche added 1 comment

                            File net/dns/canary_domain_service.cc
                            Line 110, Patchset 38 (Latest): base::SequencedTaskRunner::GetCurrentDefault()->PostTask(
                            Brian Begnoche . resolved

                            I've updated this to post a task. Without this, the DNS resolution can fail with `DNS_CACHE_INVALIDATION_IN_PROGRESS`. I discovered this while changing the Secure DNS setting in chrome://settings/security and seeing that the result when changing the setting was `DNS_CACHE_INVALIDATION_IN_PROGRESS` instead of the correct result. So I think this is resolved.

                            But I also notice that if I spam changes to the setting, sometimes there's a DCHECK failure here in `HostResolverManager::InvalidateCaches`. I'm not sure how to make it happen deterministically either.

                            `DCHECK_EQ(num_jobs, jobs_.size());`

                            https://source.chromium.org/chromium/chromium/src/+/main:net/dns/host_resolver_manager.cc;l=1813;drc=75bd37cd98d8654e740d5b267c1be6fbf81c6ede

                            Kenichi Ishibashi

                            Coincidentally, I was looking into the root cause (https://crbug.com/486443374). Here is Gemini's summary: https://paste.googleplex.com/5640716798787584
                            WIP CL: https://crrev.com/c/7601235

                            The proposed fix doesn't seem to work (e.g. break existing tests). I had a long conversation with gemini-cli. Still figuring out what's a better way to fix the issue.

                            Brian Begnoche

                            Thanks for the pointers. I will consider this an existing issue not created or exacerbated by this change.

                            Open in Gerrit

                            Related details

                            Attention is currently required from:
                            • David Schinazi
                            Submit Requirements:
                              • requirement satisfiedCode-Coverage
                              • requirement is not 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                              Gerrit-Change-Number: 7509892
                              Gerrit-PatchSet: 38
                              Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                              Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                              Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                              Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                              Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                              Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                              Gerrit-CC: Varun Khaneja <va...@chromium.org>
                              Gerrit-Attention: David Schinazi <dsch...@chromium.org>
                              Gerrit-Comment-Date: Wed, 25 Feb 2026 14:09:32 +0000
                              Gerrit-HasComments: Yes
                              Gerrit-Has-Labels: No
                              satisfied_requirement
                              unsatisfied_requirement
                              open
                              diffy

                              Brian Begnoche (Gerrit)

                              unread,
                              Feb 25, 2026, 11:51:04 AM (6 days ago) Feb 25
                              to Kenichi Ishibashi, Andrew Williams, David Schinazi, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                              Attention needed from Andrew Williams, David Schinazi and Kenichi Ishibashi

                              Brian Begnoche added 1 comment

                              File net/dns/canary_domain_service.cc
                              Line 119, Patchset 39 (Latest): if (!resolve_context_->IsDohFallbackProbeEnabled()) {
                              Brian Begnoche . resolved

                              I realized that the canary domain probe was being triggered for every secure_dns_mode and not just AUTOMATIC w/ DoH fallback. This added check addresses this.

                              Open in Gerrit

                              Related details

                              Attention is currently required from:
                              • Andrew Williams
                              • David Schinazi
                              • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                                Gerrit-Change-Number: 7509892
                                Gerrit-PatchSet: 39
                                Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                                Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                                Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                                Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                                Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                                Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                                Gerrit-CC: Varun Khaneja <va...@chromium.org>
                                Gerrit-Attention: Kenichi Ishibashi <ba...@chromium.org>
                                Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                                Gerrit-Attention: David Schinazi <dsch...@chromium.org>
                                Gerrit-Comment-Date: Wed, 25 Feb 2026 16:50:59 +0000
                                Gerrit-HasComments: Yes
                                Gerrit-Has-Labels: No
                                satisfied_requirement
                                unsatisfied_requirement
                                open
                                diffy

                                Kenichi Ishibashi (Gerrit)

                                unread,
                                Feb 25, 2026, 9:37:08 PM (6 days ago) Feb 25
                                to Brian Begnoche, Andrew Williams, David Schinazi, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                                Attention needed from Andrew Williams, Brian Begnoche and David Schinazi

                                Kenichi Ishibashi voted and added 6 comments

                                Votes added by Kenichi Ishibashi

                                Code-Review+1

                                6 comments

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

                                lgtm with nits

                                File net/dns/canary_domain_service.cc
                                Line 119, Patchset 39: if (!resolve_context_->IsDohFallbackProbeEnabled()) {
                                Brian Begnoche . resolved

                                I realized that the canary domain probe was being triggered for every secure_dns_mode and not just AUTOMATIC w/ DoH fallback. This added check addresses this.

                                Kenichi Ishibashi

                                I'm wondering if we could prevent CanaryDomainService from running when the mode is set to AUTOMATIC w/o DoH fallback in the first place.

                                Line 128, Patchset 39: resolve_context_->set_doh_fallback_canary_domain_check_status(
                                CanaryDomainCheckStatus::kStarted);
                                Kenichi Ishibashi . unresolved

                                nit: Move this above (below `pending_probe_request_.reset()`) and update the comment to reset the status as well, so that we can remove line 120.

                                File net/dns/canary_domain_service_unittest.cc
                                Line 63, Patchset 40 (Latest): config, base::BindRepeating([](int, int) -> int { return 0; }), nullptr);
                                Kenichi Ishibashi . unresolved

                                nit: `/*net_log=*/nullptr`

                                File net/dns/context_host_resolver_unittest.cc
                                Line 172, Patchset 40 (Latest): config, base::BindRepeating([](int, int) -> int { return 0; }), nullptr);
                                Kenichi Ishibashi . unresolved

                                nit: `/*net_log=*/nullptr`. Ditto below.

                                We may also consider adding a lambda to create a DnsSession instance (and possibly other set up) to reduce duplications.

                                File net/dns/mock_host_resolver.h
                                Line 484, Patchset 40 (Latest): raw_ptr<ResolveContext> resolve_context_ = nullptr;
                                Kenichi Ishibashi . unresolved

                                nit: IIUC nullptr is the default value so we don't need to explicitly set this.

                                Open in Gerrit

                                Related details

                                Attention is currently required from:
                                • Andrew Williams
                                • Brian Begnoche
                                • David Schinazi
                                Submit Requirements:
                                  • requirement satisfiedCode-Coverage
                                  • requirement is not satisfiedCode-Owners
                                  • requirement satisfiedCode-Review
                                  • requirement is not satisfiedNo-Unresolved-Comments
                                  • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                                  Gerrit-Change-Number: 7509892
                                  Gerrit-PatchSet: 40
                                  Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                                  Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                                  Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                                  Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                                  Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                                  Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                                  Gerrit-CC: Varun Khaneja <va...@chromium.org>
                                  Gerrit-Attention: Brian Begnoche <b...@chromium.org>
                                  Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                                  Gerrit-Attention: David Schinazi <dsch...@chromium.org>
                                  Gerrit-Comment-Date: Thu, 26 Feb 2026 02:36:45 +0000
                                  satisfied_requirement
                                  unsatisfied_requirement
                                  open
                                  diffy

                                  David Schinazi (Gerrit)

                                  unread,
                                  Feb 26, 2026, 2:39:52 PM (5 days ago) Feb 26
                                  to Brian Begnoche, Kenichi Ishibashi, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                                  Attention needed from Andrew Williams and Brian Begnoche

                                  David Schinazi voted and added 1 comment

                                  Votes added by David Schinazi

                                  Code-Review+1

                                  1 comment

                                  Patchset-level comments
                                  David Schinazi . resolved

                                  LGTM for enums.xml and histograms.xml

                                  Open in Gerrit

                                  Related details

                                  Attention is currently required from:
                                  • Andrew Williams
                                  • Brian Begnoche
                                  Submit Requirements:
                                  • requirement satisfiedCode-Coverage
                                  • requirement satisfiedCode-Owners
                                  • requirement satisfiedCode-Review
                                  • requirement is not satisfiedNo-Unresolved-Comments
                                  • 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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                                  Gerrit-Change-Number: 7509892
                                  Gerrit-PatchSet: 40
                                  Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                                  Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                                  Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                                  Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                                  Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                                  Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                                  Gerrit-CC: Varun Khaneja <va...@chromium.org>
                                  Gerrit-Attention: Brian Begnoche <b...@chromium.org>
                                  Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                                  Gerrit-Comment-Date: Thu, 26 Feb 2026 19:39:43 +0000
                                  Gerrit-HasComments: Yes
                                  Gerrit-Has-Labels: Yes
                                  satisfied_requirement
                                  unsatisfied_requirement
                                  open
                                  diffy

                                  Brian Begnoche (Gerrit)

                                  unread,
                                  Feb 26, 2026, 3:18:41 PM (5 days ago) Feb 26
                                  to David Schinazi, Kenichi Ishibashi, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                                  Attention needed from Andrew Williams

                                  Brian Begnoche added 8 comments

                                  File net/dns/canary_domain_service.cc
                                  Line 119, Patchset 39: if (!resolve_context_->IsDohFallbackProbeEnabled()) {
                                  Brian Begnoche . resolved

                                  I realized that the canary domain probe was being triggered for every secure_dns_mode and not just AUTOMATIC w/ DoH fallback. This added check addresses this.

                                  Kenichi Ishibashi

                                  I'm wondering if we could prevent CanaryDomainService from running when the mode is set to AUTOMATIC w/o DoH fallback in the first place.

                                  Brian Begnoche

                                  This was my first thought and attempt too, by updating ContextHostResolver::CreateCanaryDomainService to return null in any case other than AUTOMATIC+DoHF.

                                  Doing it that way would require some additional event plumbing into CanaryDomainService. I found that this works to only trigger the probe on startup with AUTO+DoHF, but then changing the mode in chrome://settings/security would not retrigger, ultimately because that doesn't trigger recreating network contexts, apparently.

                                  This way, every time the setting changes, `OnSessionChanged` and `OnDohServerUnavailable` both fire to reset and retrigger the probe.

                                  I could have CanaryDomainService self-register as a `NetworkChangeNotifier::DNSObserver` to catch the settings changes, but I'm not convinced that it's actually better. The CDS would still need to be created to respond to events. Perhaps NetworkContext could register and create or tear down the CDS depending.

                                  This is simpler and more in line with mirroring DoH probe behavior, so I will stick with this unless there is strong reason not to.

                                  Line 128, Patchset 39: resolve_context_->set_doh_fallback_canary_domain_check_status(
                                  CanaryDomainCheckStatus::kStarted);
                                  Kenichi Ishibashi . resolved

                                  nit: Move this above (below `pending_probe_request_.reset()`) and update the comment to reset the status as well, so that we can remove line 120.

                                  Brian Begnoche

                                  I'm not sure that I follow. Line 120 sets the status to `kNotStarted`, whereas this line sets it to `kStarted`.

                                  This line is after the IsDohFallbackProbeEnabled check, because it should enter a started state if that check passes.

                                  I did remove line 120, however, because it is actually redundant. The two paths to get to `ProbeSecureDnsDomain()`:

                                  1. `Start()` after initialization, including setting status to `kNotStarted`
                                  2. `OnDohServerUnavailable()` called after `OnSessionChanged()` is called and resets the status to `kNotStarted`.

                                  `OnSessionChanged()` also resets `pending_probe_request_`, so actually resetting that here and resetting the status are both redundant. Both should have already occurred when this method called. So I removed lines 116-117 too.

                                  File net/dns/canary_domain_service_unittest.cc
                                  Line 63, Patchset 40: config, base::BindRepeating([](int, int) -> int { return 0; }), nullptr);
                                  Kenichi Ishibashi . resolved

                                  nit: `/*net_log=*/nullptr`

                                  Brian Begnoche

                                  Done

                                  Line 63, Patchset 40: config, base::BindRepeating([](int, int) -> int { return 0; }), nullptr);
                                  Kenichi Ishibashi . resolved

                                  nit: `/*net_log=*/nullptr`

                                  Brian Begnoche

                                  Done

                                  File net/dns/context_host_resolver_unittest.cc
                                  Line 172, Patchset 40: config, base::BindRepeating([](int, int) -> int { return 0; }), nullptr);
                                  Kenichi Ishibashi . resolved

                                  nit: `/*net_log=*/nullptr`. Ditto below.

                                  We may also consider adding a lambda to create a DnsSession instance (and possibly other set up) to reduce duplications.

                                  Brian Begnoche

                                  Done

                                  Line 172, Patchset 40: config, base::BindRepeating([](int, int) -> int { return 0; }), nullptr);
                                  Kenichi Ishibashi . resolved

                                  nit: `/*net_log=*/nullptr`. Ditto below.

                                  We may also consider adding a lambda to create a DnsSession instance (and possibly other set up) to reduce duplications.

                                  Brian Begnoche

                                  Done

                                  Line 172, Patchset 40: config, base::BindRepeating([](int, int) -> int { return 0; }), nullptr);
                                  Kenichi Ishibashi . resolved

                                  nit: `/*net_log=*/nullptr`. Ditto below.

                                  We may also consider adding a lambda to create a DnsSession instance (and possibly other set up) to reduce duplications.

                                  Brian Begnoche

                                  Done

                                  File net/dns/mock_host_resolver.h
                                  Line 484, Patchset 40: raw_ptr<ResolveContext> resolve_context_ = nullptr;
                                  Kenichi Ishibashi . resolved

                                  nit: IIUC nullptr is the default value so we don't need to explicitly set this.

                                  Brian Begnoche

                                  Done

                                  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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                                    Gerrit-Change-Number: 7509892
                                    Gerrit-PatchSet: 41
                                    Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                                    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                                    Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                                    Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                                    Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                                    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
                                    Gerrit-CC: Varun Khaneja <va...@chromium.org>
                                    Gerrit-Attention: Andrew Williams <awi...@chromium.org>
                                    Gerrit-Comment-Date: Thu, 26 Feb 2026 20:18:34 +0000
                                    Gerrit-HasComments: Yes
                                    Gerrit-Has-Labels: No
                                    satisfied_requirement
                                    open
                                    diffy

                                    Brian Begnoche (Gerrit)

                                    unread,
                                    Mar 2, 2026, 10:11:02 AM (yesterday) Mar 2
                                    to David Schinazi, Kenichi Ishibashi, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                                    Attention needed from Andrew Williams

                                    Brian Begnoche voted Commit-Queue+2

                                    Commit-Queue+2
                                    Gerrit-Comment-Date: Mon, 02 Mar 2026 15:10:55 +0000
                                    Gerrit-HasComments: No
                                    Gerrit-Has-Labels: Yes
                                    satisfied_requirement
                                    open
                                    diffy

                                    Brian Begnoche (Gerrit)

                                    unread,
                                    Mar 2, 2026, 12:25:46 PM (24 hours ago) Mar 2
                                    to David Schinazi, Kenichi Ishibashi, Andrew Williams, Chromium LUCI CQ, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org
                                    Gerrit-Comment-Date: Mon, 02 Mar 2026 17:25:38 +0000
                                    Gerrit-HasComments: No
                                    Gerrit-Has-Labels: Yes
                                    satisfied_requirement
                                    open
                                    diffy

                                    Chromium LUCI CQ (Gerrit)

                                    unread,
                                    Mar 2, 2026, 12:29:51 PM (24 hours ago) Mar 2
                                    to Brian Begnoche, David Schinazi, Kenichi Ishibashi, Andrew Williams, Varun Khaneja, Chromium Metrics Reviews, AyeAye, fenced-fra...@chromium.org, network-ser...@chromium.org, asvitkine...@chromium.org, net-r...@chromium.org, bnc+...@chromium.org

                                    Chromium LUCI CQ submitted the change with unreviewed changes

                                    Unreviewed changes

                                    40 is the latest approved patch-set.
                                    The change was submitted with unreviewed changes in the following files:

                                    ```
                                    The name of the file: net/dns/canary_domain_service_unittest.cc
                                    Insertions: 2, Deletions: 1.

                                    The diff is too large to show. Please review the diff.
                                    ```
                                    ```
                                    The name of the file: net/dns/context_host_resolver_unittest.cc
                                    Insertions: 9, Deletions: 6.

                                    The diff is too large to show. Please review the diff.
                                    ```
                                    ```
                                    The name of the file: net/dns/canary_domain_service.cc
                                    Insertions: 0, Deletions: 5.

                                    The diff is too large to show. Please review the diff.
                                    ```
                                    ```
                                    The name of the file: tools/metrics/histograms/metadata/net/histograms.xml
                                    Insertions: 34, Deletions: 0.

                                    The diff is too large to show. Please review the diff.
                                    ```
                                    ```
                                    The name of the file: net/dns/mock_host_resolver.h
                                    Insertions: 1, Deletions: 1.

                                    The diff is too large to show. Please review the diff.
                                    ```
                                    ```
                                    The name of the file: services/network/network_context_unittest.cc
                                    Insertions: 4, Deletions: 3.

                                    The diff is too large to show. Please review the diff.
                                    ```

                                    Change information

                                    Commit message:
                                    Implement Canary Domain check to disable DoH fallback.

                                    When Secure DNS is enabled and DoH probers start (guarded by feature
                                    flag):

                                    * Also perform a canary domain check of a flag-specified host.

                                    * `DnsClient::FallbackFromSecureTransactionPreferred` is updated so
                                    that both at least one available DoH server *and* a positive canary
                                      domain result are needed to allow Secure DNS to the fallback
                                    provider)

                                    Canary domain results:
                                    * Positive response: OK with any A or AAAA records (allow DoH fallback)
                                    * Negative response: OK w/o records, or error such as NXDOMAIN or SERVFAIL
                                    Bug: 477977470
                                    Change-Id: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                                    Reviewed-by: Kenichi Ishibashi <ba...@chromium.org>
                                    Reviewed-by: David Schinazi <dsch...@chromium.org>
                                    Commit-Queue: Brian Begnoche <b...@chromium.org>
                                    Cr-Commit-Position: refs/heads/main@{#1592540}
                                    Files:
                                    • M net/base/features.cc
                                    • M net/base/features.h
                                    • M net/dns/BUILD.gn
                                    • A net/dns/canary_domain_service.cc
                                    • A net/dns/canary_domain_service.h
                                    • A net/dns/canary_domain_service_unittest.cc
                                    • M net/dns/context_host_resolver.cc
                                    • M net/dns/context_host_resolver.h
                                    • M net/dns/context_host_resolver_unittest.cc
                                    • M net/dns/dns_client.cc
                                    • M net/dns/dns_client_unittest.cc
                                    • M net/dns/dns_config.cc
                                    • M net/dns/dns_config.h
                                    • M net/dns/host_resolver.cc
                                    • M net/dns/host_resolver.h
                                    • M net/dns/mapped_host_resolver.cc
                                    • M net/dns/mapped_host_resolver.h
                                    • M net/dns/mock_host_resolver.cc
                                    • M net/dns/mock_host_resolver.h
                                    • M net/dns/resolve_context.cc
                                    • M net/dns/resolve_context.h
                                    • M net/dns/stale_host_resolver.cc
                                    • M net/dns/stale_host_resolver.h
                                    • M net/log/net_log_source_type_list.h
                                    • M services/network/network_context.cc
                                    • M services/network/network_context.h
                                    • M services/network/network_context_unittest.cc
                                    • M tools/metrics/histograms/metadata/net/enums.xml
                                    • M tools/metrics/histograms/metadata/net/histograms.xml
                                    Change size: XL
                                    Delta: 29 files changed, 999 insertions(+), 8 deletions(-)
                                    Branch: refs/heads/main
                                    Submit Requirements:
                                    • requirement satisfiedCode-Review: +1 by Kenichi Ishibashi, +1 by David Schinazi
                                    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: Ie3775a32eb925c348c499a2e31fa4b0c1518ddc0
                                    Gerrit-Change-Number: 7509892
                                    Gerrit-PatchSet: 42
                                    Gerrit-Owner: Brian Begnoche <b...@chromium.org>
                                    Gerrit-Reviewer: Andrew Williams <awi...@chromium.org>
                                    Gerrit-Reviewer: Brian Begnoche <b...@chromium.org>
                                    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
                                    Gerrit-Reviewer: David Schinazi <dsch...@chromium.org>
                                    Gerrit-Reviewer: Kenichi Ishibashi <ba...@chromium.org>
                                    open
                                    diffy
                                    satisfied_requirement
                                    Reply all
                                    Reply to author
                                    Forward
                                    0 new messages