Add test extension acting as a basic dictation provider [chromium/src : main]

0 views
Skip to first unread message

Kevin McNee (Gerrit)

unread,
May 26, 2026, 4:14:20 PM (6 days ago) May 26
to David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
Attention needed from David Bokan

Kevin McNee added 1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Kevin McNee . resolved

Adding bokan@. PTAL.

Open in Gerrit

Related details

Attention is currently required from:
  • David Bokan
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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
Gerrit-Change-Number: 7869927
Gerrit-PatchSet: 4
Gerrit-Owner: Kevin McNee <mc...@chromium.org>
Gerrit-Reviewer: David Bokan <bo...@chromium.org>
Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
Gerrit-Attention: David Bokan <bo...@chromium.org>
Gerrit-Comment-Date: Tue, 26 May 2026 20:14:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

David Bokan (Gerrit)

unread,
May 26, 2026, 4:33:05 PM (6 days ago) May 26
to Kevin McNee, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
Attention needed from Kevin McNee

David Bokan voted and added 3 comments

Votes added by David Bokan

Code-Review+1

3 comments

File chrome/browser/media/extension_media_access_handler.cc
Line 21, Patchset 4 (Latest):// This is a short-term solution to grant camera and/or microphone access to
David Bokan . resolved

_laughs in git blame_

File chrome/test/data/extensions/dictation/background.js
Line 17, Patchset 4 (Latest):let creatingDocument;
David Bokan . unresolved

nit: initialize to `null`

File chrome/test/data/extensions/dictation/offscreen.js
Line 51, Patchset 4 (Latest): stopRecognition();
David Bokan . unresolved

Should we sendResponse here as well so that we can stop the UI only when the reply comes? e.g. if there's an exception handling the end message we shouldn't close the UI / show it as stopped

Open in Gerrit

Related details

Attention is currently required from:
  • Kevin McNee
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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
    Gerrit-Change-Number: 7869927
    Gerrit-PatchSet: 4
    Gerrit-Owner: Kevin McNee <mc...@chromium.org>
    Gerrit-Reviewer: David Bokan <bo...@chromium.org>
    Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
    Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
    Gerrit-Attention: Kevin McNee <mc...@chromium.org>
    Gerrit-Comment-Date: Tue, 26 May 2026 20:33:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Kevin McNee (Gerrit)

    unread,
    May 26, 2026, 6:28:05 PM (6 days ago) May 26
    to David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org

    Kevin McNee added 2 comments

    File chrome/test/data/extensions/dictation/background.js
    Line 17, Patchset 4:let creatingDocument;
    David Bokan . resolved

    nit: initialize to `null`

    Kevin McNee

    Done

    File chrome/test/data/extensions/dictation/offscreen.js
    Line 51, Patchset 4: stopRecognition();
    David Bokan . resolved

    Should we sendResponse here as well so that we can stop the UI only when the reply comes? e.g. if there's an exception handling the end message we shouldn't close the UI / show it as stopped

    Kevin McNee

    For a production impl, sure. But I don't think this stop function can fail.

    Open in Gerrit

    Related details

    Attention set is empty
    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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
      Gerrit-Change-Number: 7869927
      Gerrit-PatchSet: 5
      Gerrit-Owner: Kevin McNee <mc...@chromium.org>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
      Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
      Gerrit-Comment-Date: Tue, 26 May 2026 22:27:55 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: David Bokan <bo...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Kevin McNee (Gerrit)

      unread,
      May 26, 2026, 6:42:58 PM (6 days ago) May 26
      to Tim, David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
      Attention needed from Frank Liberato and Tim

      Kevin McNee added 1 comment

      Patchset-level comments
      File-level comment, Patchset 5 (Latest):
      Kevin McNee . resolved

      Adding the following for allowlisting this test extension for audioCapture:
      tjudkins@ for _permission_features.json and extension_constants.h
      liberato@ for extension_media_access_handler.cc
      PTAL.

      CC andreaorru@. FYI.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Frank Liberato
      • Tim
      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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
      Gerrit-Change-Number: 7869927
      Gerrit-PatchSet: 5
      Gerrit-Owner: Kevin McNee <mc...@chromium.org>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
      Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
      Gerrit-Reviewer: Tim <tjud...@chromium.org>
      Gerrit-CC: Andrea Orru <andre...@chromium.org>
      Gerrit-Attention: Tim <tjud...@chromium.org>
      Gerrit-Attention: Frank Liberato <libe...@chromium.org>
      Gerrit-Comment-Date: Tue, 26 May 2026 22:42:46 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Frank Liberato (Gerrit)

      unread,
      May 26, 2026, 7:00:55 PM (6 days ago) May 26
      to Kevin McNee, Tim, David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
      Attention needed from Kevin McNee and Tim

      Frank Liberato voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Kevin McNee
      • Tim
      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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
      Gerrit-Change-Number: 7869927
      Gerrit-PatchSet: 5
      Gerrit-Owner: Kevin McNee <mc...@chromium.org>
      Gerrit-Reviewer: David Bokan <bo...@chromium.org>
      Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
      Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
      Gerrit-Reviewer: Tim <tjud...@chromium.org>
      Gerrit-CC: Andrea Orru <andre...@chromium.org>
      Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
      Gerrit-Attention: Kevin McNee <mc...@chromium.org>
      Gerrit-Attention: Tim <tjud...@chromium.org>
      Gerrit-Comment-Date: Tue, 26 May 2026 23:00:42 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Tim (Gerrit)

      unread,
      May 27, 2026, 6:39:51 PM (5 days ago) May 27
      to Kevin McNee, David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
      Attention needed from Kevin McNee

      Tim added 2 comments

      Patchset-level comments
      Tim . resolved

      Thanks Kevin, one main question about how this test extension is actually intended to be used and how we can avoid adding the allowlist for the test extension.

      File chrome/browser/media/extension_media_access_handler.cc
      Line 42, Patchset 5 (Latest): extension->id() == extension_misc::kDictationTestExtensionId;
      Tim . unresolved

      I don't like having to have an entry in here just for a test-only extension, that's generally an anti-pattern we try to avoid. Depending on how this test extension is actually used in tests, there's probably a better test-specific way to ensure it gets the permission grants it requires.

      Which brings up the other main point: This CL is adding the test extension and related permission grants, but no actual usage of the extension in tests, so it's hard to gauge correctness. Could you add the actual tests that will use the test extension into this CL?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Kevin McNee
      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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
        Gerrit-Change-Number: 7869927
        Gerrit-PatchSet: 5
        Gerrit-Owner: Kevin McNee <mc...@chromium.org>
        Gerrit-Reviewer: David Bokan <bo...@chromium.org>
        Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
        Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
        Gerrit-Reviewer: Tim <tjud...@chromium.org>
        Gerrit-CC: Andrea Orru <andre...@chromium.org>
        Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
        Gerrit-Attention: Kevin McNee <mc...@chromium.org>
        Gerrit-Comment-Date: Wed, 27 May 2026 22:39:41 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Kevin McNee (Gerrit)

        unread,
        May 28, 2026, 9:18:26 PM (4 days ago) May 28
        to Tim, David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
        Attention needed from David Bokan, Frank Liberato and Tim

        Kevin McNee added 1 comment

        File chrome/browser/media/extension_media_access_handler.cc
        Line 42, Patchset 5: extension->id() == extension_misc::kDictationTestExtensionId;
        Tim . unresolved

        I don't like having to have an entry in here just for a test-only extension, that's generally an anti-pattern we try to avoid. Depending on how this test extension is actually used in tests, there's probably a better test-specific way to ensure it gets the permission grants it requires.

        Which brings up the other main point: This CL is adding the test extension and related permission grants, but no actual usage of the extension in tests, so it's hard to gauge correctness. Could you add the actual tests that will use the test extension into this CL?

        Kevin McNee

        Okay, this function appears to essentially be re-implementing the allowlist property from _permission_features.json. I've rewritten this to check the manifest availability from the extensions code. This also means it'll respect `--allowlisted-extension-id`. PTAL.

        Were you just referring to hard coding the id for this function? Or do you have a concern with its inclusion in the _permission_features.json allowlist? I'd like to have it there for manual testing convenience. But I suppose using `--allowlisted-extension-id` would be fine. PLMK.

        As for the purpose of this extension: At this stage, it's basically just a prototype showing we can go from voice to having a transcription in the extension's sw, subsequently to be sent to the browser. So it's just manual at this point. It'll do something more useful once more of the dictation code is built out.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • David Bokan
        • Frank Liberato
        • Tim
        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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
          Gerrit-Change-Number: 7869927
          Gerrit-PatchSet: 6
          Gerrit-Owner: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
          Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: Tim <tjud...@chromium.org>
          Gerrit-CC: Andrea Orru <andre...@chromium.org>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-Attention: Tim <tjud...@chromium.org>
          Gerrit-Attention: David Bokan <bo...@chromium.org>
          Gerrit-Attention: Frank Liberato <libe...@chromium.org>
          Gerrit-Comment-Date: Fri, 29 May 2026 01:18:12 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Tim <tjud...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Tim (Gerrit)

          unread,
          May 29, 2026, 8:23:11 PM (3 days ago) May 29
          to Kevin McNee, David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
          Attention needed from David Bokan, Frank Liberato and Kevin McNee

          Tim added 3 comments

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

          Thanks Kevin, a couple more comments. As mentioned in the reply comment, I think it'd be better to hold off on adding this till we've got tests that require (and exercise) it. WDYT?

          File chrome/browser/media/extension_media_access_handler.cc
          Line 42, Patchset 5: extension->id() == extension_misc::kDictationTestExtensionId;
          Tim . unresolved

          I don't like having to have an entry in here just for a test-only extension, that's generally an anti-pattern we try to avoid. Depending on how this test extension is actually used in tests, there's probably a better test-specific way to ensure it gets the permission grants it requires.

          Which brings up the other main point: This CL is adding the test extension and related permission grants, but no actual usage of the extension in tests, so it's hard to gauge correctness. Could you add the actual tests that will use the test extension into this CL?

          Kevin McNee

          Okay, this function appears to essentially be re-implementing the allowlist property from _permission_features.json. I've rewritten this to check the manifest availability from the extensions code. This also means it'll respect `--allowlisted-extension-id`. PTAL.

          Were you just referring to hard coding the id for this function? Or do you have a concern with its inclusion in the _permission_features.json allowlist? I'd like to have it there for manual testing convenience. But I suppose using `--allowlisted-extension-id` would be fine. PLMK.

          As for the purpose of this extension: At this stage, it's basically just a prototype showing we can go from voice to having a transcription in the extension's sw, subsequently to be sent to the browser. So it's just manual at this point. It'll do something more useful once more of the dictation code is built out.

          Tim

          If this extension is a manual prototype and is not actually being used in any tests at the moment, I don't think it makes sense to go into the codebase like this yet. I appreciate trying to split changes into smaller more reviewable pieces, but I think it would be better to hold off on adding this until there's an actual test consuming it in some way. I imagine in practice this will probably end up being more like a test delegate for the dictation provider?

          Once there's actually something exercising this I think the permission side of this will be a lot clearer also. If this acts as a component extension the permission feature allowlist [wont be required](https://source.chromium.org/chromium/chromium/src/+/main:extensions/common/features/simple_feature.cc;l=709;drc=fcc8e2e643f4beab78d87a7a8566f0ed50332666). If it's just an extension installed in a test it can be granted the permission `--allowlisted-extension-id` like you said (or using SimpleFeature::ScopedThreadUnsafeAllowlistForTest in unittests). `--allowlisted-extension-id` also bypasses the [allowlist check](https://source.chromium.org/chromium/chromium/src/+/main:extensions/common/features/simple_feature.cc;l=713;drc=fcc8e2e643f4beab78d87a7a8566f0ed50332666) and [manifest location check](https://source.chromium.org/chromium/chromium/src/+/main:extensions/common/features/simple_feature.cc;l=718;drc=fcc8e2e643f4beab78d87a7a8566f0ed50332666), so as long as there's a feature block that matches all the other fields (e.g. extension type, manifest version) it is made available.

          If this still needs to bypass the audio capture permission dialog (which it probably will if it's being triggered from the offscreen document), it'll probably make more sense for it to use the ID of the actual component extension and have that entry added to the list in this file, akin to the virtual keyboard in here which has a duplicate test extension for some testing.

          Line 32, Patchset 7 (Latest): for (const std::string& capture_permission_name :
          {"audioCapture", "videoCapture"}) {
          const extensions::Feature* capture_permission =
          extensions::FeatureProvider::GetPermissionFeature(
          capture_permission_name);
          if (capture_permission) {
          extensions::Feature::Availability availability =
          capture_permission->IsAvailableToExtension(extension);
          if (availability.is_available()) {
          return true;
          }
          }
          }
          Tim . unresolved

          Going this route might seem innocuous at first, because in theory extensions should be allowlisted for `audioCapture` or `videoCapture` to be able to get here anyway. But as mentioned in the other comment component extensions bypass the allowlists (as do `--allowlisted-extension-id` loaded extensions). Since this class is about allowing an extension to bypass the associated user dialog to grant permission, this change would allow any of those extensions to now be able to silently turn on microphone and video capture.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • David Bokan
          • Frank Liberato
          • Kevin McNee
          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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
          Gerrit-Change-Number: 7869927
          Gerrit-PatchSet: 7
          Gerrit-Owner: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
          Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: Tim <tjud...@chromium.org>
          Gerrit-CC: Andrea Orru <andre...@chromium.org>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-Attention: Kevin McNee <mc...@chromium.org>
          Gerrit-Attention: David Bokan <bo...@chromium.org>
          Gerrit-Attention: Frank Liberato <libe...@chromium.org>
          Gerrit-Comment-Date: Sat, 30 May 2026 00:22:59 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Kevin McNee <mc...@chromium.org>
          Comment-In-Reply-To: Tim <tjud...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Kevin McNee (Gerrit)

          unread,
          12:01 PM (5 hours ago) 12:01 PM
          to Tim, David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
          Attention needed from David Bokan, Frank Liberato and Tim

          Kevin McNee added 1 comment

          File chrome/browser/media/extension_media_access_handler.cc
          Line 32, Patchset 7 (Latest): for (const std::string& capture_permission_name :
          {"audioCapture", "videoCapture"}) {
          const extensions::Feature* capture_permission =
          extensions::FeatureProvider::GetPermissionFeature(
          capture_permission_name);
          if (capture_permission) {
          extensions::Feature::Availability availability =
          capture_permission->IsAvailableToExtension(extension);
          if (availability.is_available()) {
          return true;
          }
          }
          }
          Tim . unresolved

          Going this route might seem innocuous at first, because in theory extensions should be allowlisted for `audioCapture` or `videoCapture` to be able to get here anyway. But as mentioned in the other comment component extensions bypass the allowlists (as do `--allowlisted-extension-id` loaded extensions). Since this class is about allowing an extension to bypass the associated user dialog to grant permission, this change would allow any of those extensions to now be able to silently turn on microphone and video capture.

          Kevin McNee

          The name of this helper function might be misleading. This is only called from SupportsStreamType. This does not actually grant the permission. For example, if I don't declare audioCapture in c/t/d/e/dictation/manifest.json, but still have it in the allowlist in _permission_features.json. Then the attempt to access the mic is rejected.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • David Bokan
          • Frank Liberato
          • Tim
          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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
          Gerrit-Change-Number: 7869927
          Gerrit-PatchSet: 7
          Gerrit-Owner: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
          Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: Tim <tjud...@chromium.org>
          Gerrit-CC: Andrea Orru <andre...@chromium.org>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-Attention: Tim <tjud...@chromium.org>
          Gerrit-Attention: David Bokan <bo...@chromium.org>
          Gerrit-Attention: Frank Liberato <libe...@chromium.org>
          Gerrit-Comment-Date: Mon, 01 Jun 2026 16:01:05 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Tim <tjud...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Tim (Gerrit)

          unread,
          1:29 PM (3 hours ago) 1:29 PM
          to Kevin McNee, David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
          Attention needed from David Bokan, Frank Liberato and Kevin McNee

          Tim added 1 comment

          File chrome/browser/media/extension_media_access_handler.cc
          Line 32, Patchset 7 (Latest): for (const std::string& capture_permission_name :
          {"audioCapture", "videoCapture"}) {
          const extensions::Feature* capture_permission =
          extensions::FeatureProvider::GetPermissionFeature(
          capture_permission_name);
          if (capture_permission) {
          extensions::Feature::Availability availability =
          capture_permission->IsAvailableToExtension(extension);
          if (availability.is_available()) {
          return true;
          }
          }
          }
          Tim . unresolved

          Going this route might seem innocuous at first, because in theory extensions should be allowlisted for `audioCapture` or `videoCapture` to be able to get here anyway. But as mentioned in the other comment component extensions bypass the allowlists (as do `--allowlisted-extension-id` loaded extensions). Since this class is about allowing an extension to bypass the associated user dialog to grant permission, this change would allow any of those extensions to now be able to silently turn on microphone and video capture.

          Kevin McNee

          The name of this helper function might be misleading. This is only called from SupportsStreamType. This does not actually grant the permission. For example, if I don't declare audioCapture in c/t/d/e/dictation/manifest.json, but still have it in the allowlist in _permission_features.json. Then the attempt to access the mic is rejected.

          Tim

          Fair, they still need to declare the permission name in the manifest, but I still feel this is a big change to what requesting the permission actually grants. If any of the existing extensions using these APIs (calling them from a user visible page) were relying on the permission dialog as part of their privacy/security model, this is a big change to that model.

          But maybe this is all moot and all the allowlisted entries in _permission_features.json (and any component/external component extensions declaring the permission) that are still relevant already have an entry in here to bypass the dialog anyway? When you went through the _permission_features.json allowlist for the comment below did you see any that are still active but not listed in here?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • David Bokan
          • Frank Liberato
          • Kevin McNee
          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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
          Gerrit-Change-Number: 7869927
          Gerrit-PatchSet: 7
          Gerrit-Owner: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
          Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: Tim <tjud...@chromium.org>
          Gerrit-CC: Andrea Orru <andre...@chromium.org>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-Attention: Kevin McNee <mc...@chromium.org>
          Gerrit-Attention: David Bokan <bo...@chromium.org>
          Gerrit-Attention: Frank Liberato <libe...@chromium.org>
          Gerrit-Comment-Date: Mon, 01 Jun 2026 17:29:45 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Kevin McNee (Gerrit)

          unread,
          2:22 PM (3 hours ago) 2:22 PM
          to Tim, David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
          Attention needed from David Bokan, Frank Liberato and Tim

          Kevin McNee added 1 comment

          File chrome/browser/media/extension_media_access_handler.cc
          Line 32, Patchset 7 (Latest): for (const std::string& capture_permission_name :
          {"audioCapture", "videoCapture"}) {
          const extensions::Feature* capture_permission =
          extensions::FeatureProvider::GetPermissionFeature(
          capture_permission_name);
          if (capture_permission) {
          extensions::Feature::Availability availability =
          capture_permission->IsAvailableToExtension(extension);
          if (availability.is_available()) {
          return true;
          }
          }
          }
          Tim . unresolved

          Going this route might seem innocuous at first, because in theory extensions should be allowlisted for `audioCapture` or `videoCapture` to be able to get here anyway. But as mentioned in the other comment component extensions bypass the allowlists (as do `--allowlisted-extension-id` loaded extensions). Since this class is about allowing an extension to bypass the associated user dialog to grant permission, this change would allow any of those extensions to now be able to silently turn on microphone and video capture.

          Kevin McNee

          The name of this helper function might be misleading. This is only called from SupportsStreamType. This does not actually grant the permission. For example, if I don't declare audioCapture in c/t/d/e/dictation/manifest.json, but still have it in the allowlist in _permission_features.json. Then the attempt to access the mic is rejected.

          Tim

          Fair, they still need to declare the permission name in the manifest, but I still feel this is a big change to what requesting the permission actually grants. If any of the existing extensions using these APIs (calling them from a user visible page) were relying on the permission dialog as part of their privacy/security model, this is a big change to that model.

          But maybe this is all moot and all the allowlisted entries in _permission_features.json (and any component/external component extensions declaring the permission) that are still relevant already have an entry in here to bypass the dialog anyway? When you went through the _permission_features.json allowlist for the comment below did you see any that are still active but not listed in here?

          Kevin McNee

          There are some entries in the audioCapture allowlist that aren't here, but they're either test extensions (associated with http://crbug.com/496954 ) or what appears to be a disused google internal extension ( http://crbug.com/431978 ).

          Open in Gerrit

          Related details

          Attention is currently required from:
          • David Bokan
          • Frank Liberato
          • Tim
          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: Ia72b9783c60c9bd1b29bebe6b2ccb748002dda9f
          Gerrit-Change-Number: 7869927
          Gerrit-PatchSet: 7
          Gerrit-Owner: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: David Bokan <bo...@chromium.org>
          Gerrit-Reviewer: Frank Liberato <libe...@chromium.org>
          Gerrit-Reviewer: Kevin McNee <mc...@chromium.org>
          Gerrit-Reviewer: Tim <tjud...@chromium.org>
          Gerrit-CC: Andrea Orru <andre...@chromium.org>
          Gerrit-CC: Rijubrata Bhaumik <rijubrat...@intel.com>
          Gerrit-Attention: Tim <tjud...@chromium.org>
          Gerrit-Attention: David Bokan <bo...@chromium.org>
          Gerrit-Attention: Frank Liberato <libe...@chromium.org>
          Gerrit-Comment-Date: Mon, 01 Jun 2026 18:22:36 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Tim <tjud...@chromium.org>
          Comment-In-Reply-To: Kevin McNee <mc...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Kevin McNee (Gerrit)

          unread,
          2:36 PM (2 hours ago) 2:36 PM
          to Tim, David Bokan, Chromium LUCI CQ, Rijubrata Bhaumik, android-bu...@system.gserviceaccount.com, chromium-a...@chromium.org, chfreme...@chromium.org, extension...@chromium.org, feature-me...@chromium.org
          Attention needed from David Bokan, Frank Liberato and Tim

          Kevin McNee added 1 comment

          File chrome/browser/media/extension_media_access_handler.cc
          Line 32, Patchset 7 (Latest): for (const std::string& capture_permission_name :
          {"audioCapture", "videoCapture"}) {
          const extensions::Feature* capture_permission =
          extensions::FeatureProvider::GetPermissionFeature(
          capture_permission_name);
          if (capture_permission) {
          extensions::Feature::Availability availability =
          capture_permission->IsAvailableToExtension(extension);
          if (availability.is_available()) {
          return true;
          }
          }
          }
          Tim . unresolved

          Going this route might seem innocuous at first, because in theory extensions should be allowlisted for `audioCapture` or `videoCapture` to be able to get here anyway. But as mentioned in the other comment component extensions bypass the allowlists (as do `--allowlisted-extension-id` loaded extensions). Since this class is about allowing an extension to bypass the associated user dialog to grant permission, this change would allow any of those extensions to now be able to silently turn on microphone and video capture.

          Kevin McNee

          The name of this helper function might be misleading. This is only called from SupportsStreamType. This does not actually grant the permission. For example, if I don't declare audioCapture in c/t/d/e/dictation/manifest.json, but still have it in the allowlist in _permission_features.json. Then the attempt to access the mic is rejected.

          Tim

          Fair, they still need to declare the permission name in the manifest, but I still feel this is a big change to what requesting the permission actually grants. If any of the existing extensions using these APIs (calling them from a user visible page) were relying on the permission dialog as part of their privacy/security model, this is a big change to that model.

          But maybe this is all moot and all the allowlisted entries in _permission_features.json (and any component/external component extensions declaring the permission) that are still relevant already have an entry in here to bypass the dialog anyway? When you went through the _permission_features.json allowlist for the comment below did you see any that are still active but not listed in here?

          Kevin McNee

          There are some entries in the audioCapture allowlist that aren't here, but they're either test extensions (associated with http://crbug.com/496954 ) or what appears to be a disused google internal extension ( http://crbug.com/431978 ).

          Kevin McNee

          I suppose a minimal change here would be to check for component extensions or the use of allowlisted-extension-id. But it would seem unfortunate to me to have ad-hoc extension permission logic outside of extension code.

          Gerrit-Comment-Date: Mon, 01 Jun 2026 18:36:23 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages