[WebMIDI] Sync ChildProcessSecurityPolicy with DevTools overrides [chromium/src : main]

0 views
Skip to first unread message

Hongchan Choi (Gerrit)

unread,
May 27, 2026, 8:29:36 PM (4 days ago) May 27
to Takashi Toyoshima, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, toyosh...@chromium.org
Attention needed from Takashi Toyoshima

Hongchan Choi added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Hongchan Choi . resolved

toyoshim@ Could you take a look at the general direction of this patch?

(I am not super familiar with this code base, so this work is assisted by AI)

Open in Gerrit

Related details

Attention is currently required from:
  • Takashi Toyoshima
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: I6c90787e9218923d12742fbb6106f1aae7cb9a91
Gerrit-Change-Number: 7879619
Gerrit-PatchSet: 1
Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Thu, 28 May 2026 00:29:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Toyoshima (Gerrit)

unread,
May 27, 2026, 10:27:43 PM (4 days ago) May 27
to Hongchan Choi, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, toyosh...@chromium.org
Attention needed from Hongchan Choi

Takashi Toyoshima voted and added 1 comment

Votes added by Takashi Toyoshima

Code-Review+1

1 comment

Patchset-level comments
Takashi Toyoshima . resolved

thank you!

Open in Gerrit

Related details

Attention is currently required from:
  • Hongchan Choi
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: I6c90787e9218923d12742fbb6106f1aae7cb9a91
Gerrit-Change-Number: 7879619
Gerrit-PatchSet: 1
Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Attention: Hongchan Choi <hong...@chromium.org>
Gerrit-Comment-Date: Thu, 28 May 2026 02:27:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Hongchan Choi (Gerrit)

unread,
May 28, 2026, 9:50:26 AM (4 days ago) May 28
to Takashi Toyoshima, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, toyosh...@chromium.org

Hongchan Choi voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
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: I6c90787e9218923d12742fbb6106f1aae7cb9a91
Gerrit-Change-Number: 7879619
Gerrit-PatchSet: 1
Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Thu, 28 May 2026 13:50:07 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
May 28, 2026, 9:54:07 AM (4 days ago) May 28
to Hongchan Choi, Takashi Toyoshima, chromium...@chromium.org, feature-me...@chromium.org, toyosh...@chromium.org

Chromium LUCI CQ submitted the change

Change information

Commit message:
[WebMIDI] Sync ChildProcessSecurityPolicy with DevTools overrides

DevTools permission overrides only update PermissionController but
fail to update ChildProcessSecurityPolicy for the renderer process.
This creates a capability mismatch when Headless/Automation tests
grant MIDI permissions via CDP, but subsequent SysEx actions are
rejected by MidiHost checks on the IO thread.

This patch resolves the issue by:
- Introducing a `BindMidiSessionProvider` helper on the UI thread.
- Intercepting MidiSessionProvider Mojo bindings to check the frame's
overridden permission status via PermissionController.
- Dynamically calling GrantSendMidiMessage and/or
GrantSendMidiSysExMessage on ChildProcessSecurityPolicyImpl to
authorize the process.
- Post-forwarding the Mojo binding to MidiHost on the IO thread.
Bug: 40793528
Test: MidiBrowserTestWithPermissionOverride.RequestMIDIAccessWithSysexOverride
Change-Id: I6c90787e9218923d12742fbb6106f1aae7cb9a91
Commit-Queue: Hongchan Choi <hong...@chromium.org>
Reviewed-by: Takashi Toyoshima <toyo...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1637676}
Files:
  • M content/browser/browser_interface_binders.cc
  • M content/browser/media/midi_browsertest.cc
  • M content/test/content_test_bundle_data.filelist
  • A content/test/data/midi/request_midi_sysex_access.html
Change size: M
Delta: 4 files changed, 128 insertions(+), 4 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Takashi Toyoshima
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: I6c90787e9218923d12742fbb6106f1aae7cb9a91
Gerrit-Change-Number: 7879619
Gerrit-PatchSet: 2
Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
open
diffy
satisfied_requirement

Tommy Nyquist (Gerrit)

unread,
May 28, 2026, 7:27:26 PM (3 days ago) May 28
to Chromium LUCI CQ, Hongchan Choi, Takashi Toyoshima, chromium...@chromium.org, feature-me...@chromium.org, toyosh...@chromium.org

Tommy Nyquist has created a revert of this change

Related details

Attention set is empty
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: revert
satisfied_requirement
open
diffy

Hongchan Choi (Gerrit)

unread,
May 29, 2026, 3:03:58 PM (2 days ago) May 29
to Takashi Toyoshima, chromium...@chromium.org, feature-me...@chromium.org, toyosh...@chromium.org
Attention needed from Takashi Toyoshima

Hongchan Choi voted and added 2 comments

Votes added by Hongchan Choi

Commit-Queue+1

2 comments

Patchset-level comments
Hongchan Choi . resolved

PTAL

Re-uploading the patch to address the Android Automotive CI failure on the previous CL (https://crrev.com/c/7879619).

Since system MIDI is not available on Android test emulators, I've updated the browser test to use GTEST_SKIP() on devices/emulators without MIDI support, matching standard WebMIDI test behavior.

File content/browser/media/midi_browsertest.cc
Line 175, Patchset 1 (Latest):#if BUILDFLAG(IS_ANDROID)
if (!midi::HasSystemFeatureMidiForTesting()) {
GTEST_SKIP() << "MIDI service is not available on this device.";
}
#endif // BUILDFLAG(IS_ANDROID)
Hongchan Choi . resolved

This is what we missed.

Open in Gerrit

Related details

Attention is currently required from:
  • Takashi Toyoshima
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: I0506595c3500322259db0b8844556bd221eaa8d2
Gerrit-Change-Number: 7885591
Gerrit-PatchSet: 1
Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Comment-Date: Fri, 29 May 2026 19:03:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Toyoshima (Gerrit)

unread,
May 31, 2026, 10:54:07 PM (2 hours ago) May 31
to Hongchan Choi, Chromium LUCI CQ, chromium...@chromium.org, feature-me...@chromium.org, toyosh...@chromium.org
Attention needed from Hongchan Choi

Takashi Toyoshima voted and added 2 comments

Votes added by Takashi Toyoshima

Code-Review+1

2 comments

File content/browser/browser_interface_binders.cc
Line 30, Patchset 1 (Latest):#include "content/browser/child_process_security_policy_impl.h"
Takashi Toyoshima . unresolved

include order is slightly broken here, maybe after the line 33.

File content/browser/media/midi_browsertest.cc
Line 16, Patchset 1 (Latest):#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/permissions/permission_controller_impl.h"
#include "third_party/blink/public/common/permissions/permission_utils.h"
#include "url/origin.h"
Takashi Toyoshima . unresolved

include order seems broken. `cl format`?

Open in Gerrit

Related details

Attention is currently required from:
  • Hongchan Choi
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: I0506595c3500322259db0b8844556bd221eaa8d2
Gerrit-Change-Number: 7885591
Gerrit-PatchSet: 1
Gerrit-Owner: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Hongchan Choi <hong...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Attention: Hongchan Choi <hong...@chromium.org>
Gerrit-Comment-Date: Mon, 01 Jun 2026 02:53:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages