[DirectReceiver] Bind NetworkContext as a DirectReceiver [chromium/src : main]

1 view
Skip to first unread message

Nafis Abedin (Gerrit)

unread,
Feb 25, 2026, 12:11:19 PM (6 days ago) Feb 25
to Adam Rice, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org
Attention needed from Adam Rice

Nafis Abedin added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Nafis Abedin . resolved

ricea@ PTAL at the Network Context changes :)

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Rice
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: Ib3dead515add5a48feafa554628be5eceec99fda
Gerrit-Change-Number: 7594353
Gerrit-PatchSet: 5
Gerrit-Owner: Nafis Abedin <nafis...@google.com>
Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
Gerrit-Reviewer: Nafis Abedin <nafis...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-Attention: Adam Rice <ri...@chromium.org>
Gerrit-Comment-Date: Wed, 25 Feb 2026 17:11:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Adam Rice (Gerrit)

unread,
Feb 26, 2026, 6:55:51 AM (5 days ago) Feb 26
to Nafis Abedin, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org
Attention needed from Nafis Abedin

Adam Rice voted and added 2 comments

Votes added by Adam Rice

Code-Review+1

2 comments

Patchset-level comments
Adam Rice . resolved

lgtm with nit

File services/network/network_context.cc
Line 895, Patchset 5 (Latest): if (mojo::IsDirectReceiverSupported() && base::CurrentIOThread::IsSet() &&
Adam Rice . unresolved

I don't like repeated code, so please move this to a method or something.

Open in Gerrit

Related details

Attention is currently required from:
  • Nafis Abedin
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: Ib3dead515add5a48feafa554628be5eceec99fda
    Gerrit-Change-Number: 7594353
    Gerrit-PatchSet: 5
    Gerrit-Owner: Nafis Abedin <nafis...@google.com>
    Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
    Gerrit-Reviewer: Nafis Abedin <nafis...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-Attention: Nafis Abedin <nafis...@google.com>
    Gerrit-Comment-Date: Thu, 26 Feb 2026 11:55:21 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Nafis Abedin (Gerrit)

    unread,
    Feb 27, 2026, 10:04:51 AM (4 days ago) Feb 27
    to Daniel Cheng, Adam Rice, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org
    Attention needed from Daniel Cheng

    Nafis Abedin added 2 comments

    Patchset-level comments
    File-level comment, Patchset 6 (Latest):
    Nafis Abedin . resolved

    dcheng@ PTAL :) Added directly instead of chrome-ipc-reviews@ due to mojo/ changes as well

    File services/network/network_context.cc
    Line 895, Patchset 5: if (mojo::IsDirectReceiverSupported() && base::CurrentIOThread::IsSet() &&
    Adam Rice . resolved

    I don't like repeated code, so please move this to a method or something.

    Nafis Abedin

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    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: Ib3dead515add5a48feafa554628be5eceec99fda
      Gerrit-Change-Number: 7594353
      Gerrit-PatchSet: 6
      Gerrit-Owner: Nafis Abedin <nafis...@google.com>
      Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Nafis Abedin <nafis...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
      Gerrit-Comment-Date: Fri, 27 Feb 2026 15:04:44 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Daniel Cheng (Gerrit)

      unread,
      Mar 1, 2026, 7:51:58 PM (2 days ago) Mar 1
      to Nafis Abedin, Daniel Cheng, Adam Rice, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org
      Attention needed from Nafis Abedin

      Daniel Cheng added 1 comment

      Patchset-level comments
      Daniel Cheng . unresolved

      Unsurprisingly, this has really broad effects.

      In general, does the network service use threads/thread pools? The documentation on direct_receiver.h specifically discourages this sort of thing.

      I guess one might argue that this isn't "really" worse than having a hop through a dedicated I/O thread... but honestly, it's kind of hard to tell with how many things this is affecting.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Nafis Abedin
      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: Ib3dead515add5a48feafa554628be5eceec99fda
        Gerrit-Change-Number: 7594353
        Gerrit-PatchSet: 6
        Gerrit-Owner: Nafis Abedin <nafis...@google.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: Nafis Abedin <nafis...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Nafis Abedin <nafis...@google.com>
        Gerrit-Comment-Date: Mon, 02 Mar 2026 00:51:46 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Adam Rice (Gerrit)

        unread,
        Mar 2, 2026, 8:33:29 AM (yesterday) Mar 2
        to Nafis Abedin, Daniel Cheng, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org
        Attention needed from Nafis Abedin

        Adam Rice voted and added 1 comment

        Votes added by Adam Rice

        Code-Review+1

        1 comment

        Patchset-level comments
        Daniel Cheng . unresolved

        Unsurprisingly, this has really broad effects.

        In general, does the network service use threads/thread pools? The documentation on direct_receiver.h specifically discourages this sort of thing.

        I guess one might argue that this isn't "really" worse than having a hop through a dedicated I/O thread... but honestly, it's kind of hard to tell with how many things this is affecting.

        Adam Rice

        The parts of the network service that are exposed to mojo are all on the IO thread. There are threads and thread pools used internally inside //net, but the public interfaces are all called on the IO thread, so AFAIK that shouldn't make any difference to mojo.

        Gerrit-Comment-Date: Mon, 02 Mar 2026 13:32:58 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Nafis Abedin (Gerrit)

        unread,
        9:51 AM (4 hours ago) 9:51 AM
        to Daniel Cheng, Adam Rice, Chromium Metrics Reviews, AyeAye, Chromium LUCI CQ, chromium...@chromium.org, asvitkine...@chromium.org, fenced-fra...@chromium.org, ipc-securi...@chromium.org, network-ser...@chromium.org
        Attention needed from Daniel Cheng

        Nafis Abedin added 1 comment

        Patchset-level comments
        Daniel Cheng . unresolved

        Unsurprisingly, this has really broad effects.

        In general, does the network service use threads/thread pools? The documentation on direct_receiver.h specifically discourages this sort of thing.

        I guess one might argue that this isn't "really" worse than having a hop through a dedicated I/O thread... but honestly, it's kind of hard to tell with how many things this is affecting.

        Adam Rice

        The parts of the network service that are exposed to mojo are all on the IO thread. There are threads and thread pools used internally inside //net, but the public interfaces are all called on the IO thread, so AFAIK that shouldn't make any difference to mojo.

        Nafis Abedin

        +1 to Adam's comment. Local testing & tracing didn't show any immediate signs of concern for that particular gotcha of DirectReceiver either.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Daniel Cheng
        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: Ib3dead515add5a48feafa554628be5eceec99fda
        Gerrit-Change-Number: 7594353
        Gerrit-PatchSet: 6
        Gerrit-Owner: Nafis Abedin <nafis...@google.com>
        Gerrit-Reviewer: Adam Rice <ri...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: Nafis Abedin <nafis...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
        Gerrit-Comment-Date: Tue, 03 Mar 2026 14:50:54 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Adam Rice <ri...@chromium.org>
        Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages