Move first call to RecomputeCurrentConnectionType to background thread [chromium/src : main]

0 views
Skip to first unread message

Chris Davis (Gerrit)

unread,
Mar 31, 2026, 5:30:51 PM (5 days ago) Mar 31
to Chromium LUCI CQ, chromium...@chromium.org, bnc+...@chromium.org, net-r...@chromium.org
Attention needed from Chris Davis

Message from Chris Davis

Set Ready For Review

Open in Gerrit

Related details

Attention is currently required from:
  • Chris Davis
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: Ide0cff3c31a8c9ba874d0e8a894da1f6491cf0b5
Gerrit-Change-Number: 7693656
Gerrit-PatchSet: 4
Gerrit-Owner: Chris Davis <chrd...@microsoft.com>
Gerrit-Reviewer: Chris Davis <chrd...@microsoft.com>
Gerrit-Attention: Chris Davis <chrd...@microsoft.com>
Gerrit-Comment-Date: Tue, 31 Mar 2026 21:30:42 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Nick Harper (Gerrit)

unread,
Apr 1, 2026, 7:20:18 PM (4 days ago) Apr 1
to Chris Davis, David Benjamin, Chromium LUCI CQ, chromium...@chromium.org, bnc+...@chromium.org, net-r...@chromium.org
Attention needed from Chris Davis and David Benjamin

Nick Harper added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Nick Harper . resolved

(I'm a Security Shepherd today thru Friday, so I probably won't have time to look at this until next week. The other reviewer, davidben, is also Security Shepherd on the same shift and might also have the same review latency/delay.)

Open in Gerrit

Related details

Attention is currently required from:
  • Chris Davis
  • David Benjamin
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: Ide0cff3c31a8c9ba874d0e8a894da1f6491cf0b5
Gerrit-Change-Number: 7693656
Gerrit-PatchSet: 4
Gerrit-Owner: Chris Davis <chrd...@microsoft.com>
Gerrit-Reviewer: Chris Davis <chrd...@microsoft.com>
Gerrit-Reviewer: David Benjamin <davi...@chromium.org>
Gerrit-Reviewer: Nick Harper <nha...@chromium.org>
Gerrit-Attention: Chris Davis <chrd...@microsoft.com>
Gerrit-Attention: David Benjamin <davi...@chromium.org>
Gerrit-Comment-Date: Wed, 01 Apr 2026 23:20:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Chris Davis (Gerrit)

unread,
Apr 1, 2026, 8:44:17 PM (4 days ago) Apr 1
to Matt Mueller, Chromium LUCI CQ, chromium...@chromium.org, bnc+...@chromium.org, net-r...@chromium.org
Attention needed from Matt Mueller and mmenke

Chris Davis added 1 comment

Patchset-level comments
Chris Davis . resolved

Updated code reviewers since Davide and Nick are on Security Shepherd this week.

Open in Gerrit

Related details

Attention is currently required from:
  • Matt Mueller
  • mmenke
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: Ide0cff3c31a8c9ba874d0e8a894da1f6491cf0b5
Gerrit-Change-Number: 7693656
Gerrit-PatchSet: 4
Gerrit-Owner: Chris Davis <chrd...@microsoft.com>
Gerrit-Reviewer: Chris Davis <chrd...@microsoft.com>
Gerrit-Reviewer: Matt Mueller <ma...@chromium.org>
Gerrit-Reviewer: mmenke <mme...@chromium.org>
Gerrit-Attention: mmenke <mme...@chromium.org>
Gerrit-Attention: Matt Mueller <ma...@chromium.org>
Gerrit-Comment-Date: Thu, 02 Apr 2026 00:44:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

mmenke (Gerrit)

unread,
Apr 2, 2026, 11:22:15 AM (3 days ago) Apr 2
to Chris Davis, Matt Mueller, Chromium LUCI CQ, chromium...@chromium.org, bnc+...@chromium.org, net-r...@chromium.org
Attention needed from Chris Davis and Matt Mueller

mmenke added 1 comment

Patchset-level comments
mmenke . resolved

Is there a chance this could make requests fail with ERR_NETWORK_CHANGED at startup, if we managed to send a request over the wire before we get the list of networks?

Even if we don't, this does mean we'll be broadcasting the change to all observers, and they may restart requests as a result.

Open in Gerrit

Related details

Attention is currently required from:
  • Chris Davis
  • Matt Mueller
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: Ide0cff3c31a8c9ba874d0e8a894da1f6491cf0b5
Gerrit-Change-Number: 7693656
Gerrit-PatchSet: 4
Gerrit-Owner: Chris Davis <chrd...@microsoft.com>
Gerrit-Reviewer: Chris Davis <chrd...@microsoft.com>
Gerrit-Reviewer: Matt Mueller <ma...@chromium.org>
Gerrit-Reviewer: mmenke <mme...@chromium.org>
Gerrit-Attention: Matt Mueller <ma...@chromium.org>
Gerrit-Attention: Chris Davis <chrd...@microsoft.com>
Gerrit-Comment-Date: Thu, 02 Apr 2026 15:22:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Chris Davis (Gerrit)

unread,
Apr 2, 2026, 3:15:06 PM (3 days ago) Apr 2
to Matt Mueller, Chromium LUCI CQ, chromium...@chromium.org, bnc+...@chromium.org, net-r...@chromium.org
Attention needed from Matt Mueller and mmenke

Chris Davis added 1 comment

Patchset-level comments
mmenke . resolved

Is there a chance this could make requests fail with ERR_NETWORK_CHANGED at startup, if we managed to send a request over the wire before we get the list of networks?

Even if we don't, this does mean we'll be broadcasting the change to all observers, and they may restart requests as a result.

Chris Davis

It does introduce a small window in early startup where the network state is unknown until we calculate the state on a background thread. When the state is known we will notify observers. I can take a look at startup traces to see how impactful this is.

Open in Gerrit

Related details

Attention is currently required from:
  • Matt Mueller
  • mmenke
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: Ide0cff3c31a8c9ba874d0e8a894da1f6491cf0b5
Gerrit-Change-Number: 7693656
Gerrit-PatchSet: 4
Gerrit-Owner: Chris Davis <chrd...@microsoft.com>
Gerrit-Reviewer: Chris Davis <chrd...@microsoft.com>
Gerrit-Reviewer: Matt Mueller <ma...@chromium.org>
Gerrit-Reviewer: mmenke <mme...@chromium.org>
Gerrit-Attention: mmenke <mme...@chromium.org>
Gerrit-Attention: Matt Mueller <ma...@chromium.org>
Gerrit-Comment-Date: Thu, 02 Apr 2026 19:14:56 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: mmenke <mme...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Chris Davis (Gerrit)

unread,
Apr 4, 2026, 12:56:47 AM (yesterday) Apr 4
to Matt Mueller, Chromium LUCI CQ, chromium...@chromium.org, bnc+...@chromium.org, net-r...@chromium.org
Attention needed from Matt Mueller and mmenke

Chris Davis added 1 comment

Patchset-level comments
mmenke . resolved

Is there a chance this could make requests fail with ERR_NETWORK_CHANGED at startup, if we managed to send a request over the wire before we get the list of networks?

Even if we don't, this does mean we'll be broadcasting the change to all observers, and they may restart requests as a result.

Chris Davis

It does introduce a small window in early startup where the network state is unknown until we calculate the state on a background thread. When the state is known we will notify observers. I can take a look at startup traces to see how impactful this is.

Chris Davis

The initial computation intentionally uses SetCurrentConnectionType (not NotifyObservers) as the callback. SetCurrentConnectionType only updates the cached value under a lock without notifying any observers, so there's no broadcast and no risk of ERR_NETWORK_CHANGED. Requests in flight will see the type transition silently from CONNECTION_UNKNOWN to the actual type without any observer-driven disruption.

Gerrit-Comment-Date: Sat, 04 Apr 2026 04:56:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: mmenke <mme...@chromium.org>
Comment-In-Reply-To: Chris Davis <chrd...@microsoft.com>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages