[<install> element] Increase maximum install PEPCs allowed per page [chromium/src : main]

0 views
Skip to first unread message

Lu Huang (Gerrit)

unread,
Jan 7, 2026, 12:19:10 PM (3 days ago) Jan 7
to Lia Hiscock, Kristin Lee, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Permissions Reviews, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
Attention needed from Lia Hiscock

Lu Huang added 5 comments

File content/browser/permissions/embedded_permission_control_checker.h
Line 39, Patchset 7 (Latest): // The request is from a <install> element.
Lu Huang . unresolved

Nit: an

File content/browser/permissions/embedded_permission_control_checker.cc
Line 74, Patchset 7 (Latest): const int max_elements =
GetMaxElementsPerPageForSource(disconnected_client->source());
Lu Huang . unresolved

Nit: declare/define this before the for loop where it's being used.

File content/browser/permissions/embedded_permission_control_checker_unittest.cc
Line 97, Patchset 7 (Latest): bool is_geolocation_source = false,
bool is_install_source = false) {
Lu Huang . unresolved

Should this be generalized, with an enum maybe? Multiple default parameters is an anti-pattern.

Line 300, Patchset 7 (Latest): DecoupleInstallFromOtherSources) {
Lu Huang . unresolved

Nit: suggest wording this as `InstallIndependentOfOtherSources`

Line 312, Patchset 7 (Latest): // source. These should also be registered, as the sources are decoupled.
Lu Huang . unresolved

Ditto.

Open in Gerrit

Related details

Attention is currently required from:
  • Lia Hiscock
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: Iacc285ca4564061eac0b73f493da3005e68761e4
Gerrit-Change-Number: 7256736
Gerrit-PatchSet: 7
Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
Gerrit-Reviewer: Lu Huang <lu...@microsoft.com>
Gerrit-CC: Kristin Lee <krist...@microsoft.com>
Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
Gerrit-Attention: Lia Hiscock <liahi...@microsoft.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 17:19:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Lia Hiscock (Gerrit)

unread,
Jan 7, 2026, 2:24:35 PM (3 days ago) Jan 7
to Lu Huang, Kristin Lee, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Permissions Reviews, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
Attention needed from Lu Huang

Lia Hiscock added 5 comments

File content/browser/permissions/embedded_permission_control_checker.h
Line 39, Patchset 7: // The request is from a <install> element.
Lu Huang . resolved

Nit: an

Lia Hiscock

Acknowledged

File content/browser/permissions/embedded_permission_control_checker.cc
Line 74, Patchset 7: const int max_elements =
GetMaxElementsPerPageForSource(disconnected_client->source());
Lu Huang . unresolved

Nit: declare/define this before the for loop where it's being used.

Lia Hiscock

This is intentionally at the beginning, as the first for loop erases the `disconnected_client` from the map so we need to cache the source first :/ I can add a comment explaining, but also open to other suggestions!

File content/browser/permissions/embedded_permission_control_checker_unittest.cc
Line 97, Patchset 7: bool is_geolocation_source = false,
bool is_install_source = false) {
Lu Huang . resolved

Should this be generalized, with an enum maybe? Multiple default parameters is an anti-pattern.

Lia Hiscock

Yeah...probably :) I debated since it's just a test but I'll update it

Line 300, Patchset 7: DecoupleInstallFromOtherSources) {
Lu Huang . unresolved

Nit: suggest wording this as `InstallIndependentOfOtherSources`

Lia Hiscock

I used `Decouple` for consistency with the existing `DecouplePermissionSources` test in this file. LMK if you still think I should switch though!

Line 312, Patchset 7: // source. These should also be registered, as the sources are decoupled.
Lu Huang . resolved

Ditto.

Lia Hiscock

Acknowledged

Open in Gerrit

Related details

Attention is currently required from:
  • Lu Huang
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: Iacc285ca4564061eac0b73f493da3005e68761e4
Gerrit-Change-Number: 7256736
Gerrit-PatchSet: 10
Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
Gerrit-Reviewer: Lu Huang <lu...@microsoft.com>
Gerrit-CC: Kristin Lee <krist...@microsoft.com>
Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
Gerrit-Attention: Lu Huang <lu...@microsoft.com>
Gerrit-Comment-Date: Wed, 07 Jan 2026 19:24:25 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Lu Huang <lu...@microsoft.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Lu Huang (Gerrit)

unread,
Jan 7, 2026, 2:53:33 PM (3 days ago) Jan 7
to Lia Hiscock, Kristin Lee, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Permissions Reviews, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
Attention needed from Lia Hiscock

Lu Huang voted and added 2 comments

Votes added by Lu Huang

Code-Review+1

2 comments

File content/browser/permissions/embedded_permission_control_checker.cc
Line 74, Patchset 7: const int max_elements =
GetMaxElementsPerPageForSource(disconnected_client->source());
Lu Huang . resolved

Nit: declare/define this before the for loop where it's being used.

Lia Hiscock

This is intentionally at the beginning, as the first for loop erases the `disconnected_client` from the map so we need to cache the source first :/ I can add a comment explaining, but also open to other suggestions!

Lu Huang

Ack. Current comment ("...before erasing the client.") seems sufficient.

File content/browser/permissions/embedded_permission_control_checker_unittest.cc
Line 300, Patchset 7: DecoupleInstallFromOtherSources) {
Lu Huang . resolved

Nit: suggest wording this as `InstallIndependentOfOtherSources`

Lia Hiscock

I used `Decouple` for consistency with the existing `DecouplePermissionSources` test in this file. LMK if you still think I should switch though!

Lu Huang

Acknowledged

Open in Gerrit

Related details

Attention is currently required from:
  • Lia Hiscock
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: Iacc285ca4564061eac0b73f493da3005e68761e4
    Gerrit-Change-Number: 7256736
    Gerrit-PatchSet: 11
    Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Lu Huang <lu...@microsoft.com>
    Gerrit-CC: Kristin Lee <krist...@microsoft.com>
    Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
    Gerrit-Attention: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Comment-Date: Wed, 07 Jan 2026 19:53:23 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Lu Huang <lu...@microsoft.com>
    Comment-In-Reply-To: Lia Hiscock <liahi...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lia Hiscock (Gerrit)

    unread,
    Jan 7, 2026, 4:56:41 PM (3 days ago) Jan 7
    to Mike West, Daniel Murphy, Lu Huang, Kristin Lee, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Permissions Reviews, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
    Attention needed from Mike West

    Lia Hiscock added 1 comment

    Patchset-level comments
    File-level comment, Patchset 11 (Latest):
    Lia Hiscock . resolved

    Hey Mike! This is ready for review when you're back :)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Mike West
    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: Iacc285ca4564061eac0b73f493da3005e68761e4
    Gerrit-Change-Number: 7256736
    Gerrit-PatchSet: 11
    Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Lu Huang <lu...@microsoft.com>
    Gerrit-Reviewer: Mike West <mk...@chromium.org>
    Gerrit-CC: Daniel Murphy <dmu...@chromium.org>
    Gerrit-CC: Kristin Lee <krist...@microsoft.com>
    Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
    Gerrit-Attention: Mike West <mk...@chromium.org>
    Gerrit-Comment-Date: Wed, 07 Jan 2026 21:56:31 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lia Hiscock (Gerrit)

    unread,
    Jan 7, 2026, 5:04:34 PM (3 days ago) Jan 7
    to Andy Paicu, Mike West, Daniel Murphy, Lu Huang, Kristin Lee, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Permissions Reviews, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
    Attention needed from Andy Paicu and Mike West

    Lia Hiscock added 1 comment

    Patchset-level comments
    Lia Hiscock . resolved

    Hi Andy! I noticed you're working on PEPC things, and I'm looking for a review on the content/browser files here. This is part of the <install> element effort we've been working on with mkwst. For context, during our monthly sync he verbally LGTM'd us increasing the element limit, but he hasn't seen any of this CL yet. LMK if this approach seems right, or if I can provide any more context while Mike is OOO. Thanks!

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andy Paicu
    • Mike West
    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: Iacc285ca4564061eac0b73f493da3005e68761e4
    Gerrit-Change-Number: 7256736
    Gerrit-PatchSet: 11
    Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Andy Paicu <andy...@chromium.org>
    Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Lu Huang <lu...@microsoft.com>
    Gerrit-Reviewer: Mike West <mk...@chromium.org>
    Gerrit-CC: Daniel Murphy <dmu...@chromium.org>
    Gerrit-CC: Kristin Lee <krist...@microsoft.com>
    Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
    Gerrit-Attention: Andy Paicu <andy...@chromium.org>
    Gerrit-Attention: Mike West <mk...@chromium.org>
    Gerrit-Comment-Date: Wed, 07 Jan 2026 22:04:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Mike West (Gerrit)

    unread,
    Jan 8, 2026, 3:44:02 AM (3 days ago) Jan 8
    to Lia Hiscock, Robert Paveza, Andy Paicu, Daniel Murphy, Lu Huang, Kristin Lee, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Permissions Reviews, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
    Attention needed from Andy Paicu and Lia Hiscock

    Mike West added 2 comments

    Patchset-level comments
    Mike West . resolved

    I think it's reasonable to allow more `<install>` elements per page than we'd be comfortable with for `<geolocation>` and other more monolithic capabilities. I do wonder whether we should limit the number of `<install>` elements that all point to the same application, as that seems like a more direct analog to the abuse scenario that the limit is meant to deal with for geolocation, cam/mic, etc? That might be worth considering as a followup.

    I'll defer to Andy on the implementation, but the broad strokes look reasonable to me, modulo some thoughts about how we communicate the type of request from Blink to //content.

    File third_party/blink/public/mojom/permissions/permission.mojom
    Line 148, Patchset 11 (Latest): bool install;
    Mike West . unresolved

    The pattern this sets up would add a new attribute for each potential type we wanted to make visible to the //content layer. I wonder if it would be more reasonable to either:

    • Hold a `source` attribute that represented the permission the element deals with (or the element name or just an enum, no strong opinion). That could simplify the //content side of the implementation as well.
    • Hold a `detail` attribute that's a union of `GeolocationEmbeddedPermissionRequestDescriptor`, `InstallEmbeddedPermissionRequestDescriptor`, etc. That's probably a little more verbose, but means we're only looking at one field, rather than a type field and then the relevant detail field.

    Either way would make it more clear what exactly this request is communicating.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andy Paicu
    • Lia Hiscock
    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: Iacc285ca4564061eac0b73f493da3005e68761e4
      Gerrit-Change-Number: 7256736
      Gerrit-PatchSet: 11
      Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
      Gerrit-Reviewer: Andy Paicu <andy...@chromium.org>
      Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
      Gerrit-Reviewer: Lu Huang <lu...@microsoft.com>
      Gerrit-Reviewer: Mike West <mk...@chromium.org>
      Gerrit-CC: Daniel Murphy <dmu...@chromium.org>
      Gerrit-CC: Kristin Lee <krist...@microsoft.com>
      Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
      Gerrit-CC: Robert Paveza <Rob.P...@microsoft.com>
      Gerrit-Attention: Andy Paicu <andy...@chromium.org>
      Gerrit-Attention: Lia Hiscock <liahi...@microsoft.com>
      Gerrit-Comment-Date: Thu, 08 Jan 2026 08:43:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Andy Paicu (Gerrit)

      unread,
      Jan 8, 2026, 12:32:40 PM (2 days ago) Jan 8
      to Lia Hiscock, Thomas Nguyen, Robert Paveza, Mike West, Daniel Murphy, Lu Huang, Kristin Lee, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Permissions Reviews, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
      Attention needed from Lia Hiscock and Thomas Nguyen

      Andy Paicu added 1 comment

      Patchset-level comments
      Andy Paicu . resolved

      Hi Thomas, I will defer to you on stuff related to the PEPC control checker.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Lia Hiscock
      • Thomas Nguyen
      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: Iacc285ca4564061eac0b73f493da3005e68761e4
      Gerrit-Change-Number: 7256736
      Gerrit-PatchSet: 11
      Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
      Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
      Gerrit-Reviewer: Lu Huang <lu...@microsoft.com>
      Gerrit-Reviewer: Mike West <mk...@chromium.org>
      Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
      Gerrit-CC: Andy Paicu <andy...@chromium.org>
      Gerrit-CC: Daniel Murphy <dmu...@chromium.org>
      Gerrit-CC: Kristin Lee <krist...@microsoft.com>
      Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
      Gerrit-CC: Robert Paveza <Rob.P...@microsoft.com>
      Gerrit-Attention: Thomas Nguyen <tun...@chromium.org>
      Gerrit-Attention: Lia Hiscock <liahi...@microsoft.com>
      Gerrit-Comment-Date: Thu, 08 Jan 2026 17:32:23 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Lia Hiscock (Gerrit)

      unread,
      Jan 9, 2026, 9:30:22 PM (19 hours ago) Jan 9
      to Thomas Nguyen, Andy Paicu, Robert Paveza, Mike West, Daniel Murphy, Lu Huang, Kristin Lee, Chromium LUCI CQ, AyeAye, chromium...@chromium.org, Permissions Reviews, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org
      Attention needed from Lu Huang, Mike West and Thomas Nguyen

      Lia Hiscock added 2 comments

      Patchset-level comments
      Mike West . resolved

      I think it's reasonable to allow more `<install>` elements per page than we'd be comfortable with for `<geolocation>` and other more monolithic capabilities. I do wonder whether we should limit the number of `<install>` elements that all point to the same application, as that seems like a more direct analog to the abuse scenario that the limit is meant to deal with for geolocation, cam/mic, etc? That might be worth considering as a followup.

      I'll defer to Andy on the implementation, but the broad strokes look reasonable to me, modulo some thoughts about how we communicate the type of request from Blink to //content.

      Lia Hiscock

      That sounds like a good idea! Opened this issue to track

      https://issues.chromium.org/issues/474262434

      File third_party/blink/public/mojom/permissions/permission.mojom
      Mike West . unresolved

      The pattern this sets up would add a new attribute for each potential type we wanted to make visible to the //content layer. I wonder if it would be more reasonable to either:

      • Hold a `source` attribute that represented the permission the element deals with (or the element name or just an enum, no strong opinion). That could simplify the //content side of the implementation as well.
      • Hold a `detail` attribute that's a union of `GeolocationEmbeddedPermissionRequestDescriptor`, `InstallEmbeddedPermissionRequestDescriptor`, etc. That's probably a little more verbose, but means we're only looking at one field, rather than a type field and then the relevant detail field.

      Either way would make it more clear what exactly this request is communicating.

      Lia Hiscock

      Makes sense! I went with the union approach, LMK what you think.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Lu Huang
      • Mike West
      • Thomas Nguyen
      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: Iacc285ca4564061eac0b73f493da3005e68761e4
        Gerrit-Change-Number: 7256736
        Gerrit-PatchSet: 12
        Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
        Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
        Gerrit-Reviewer: Lu Huang <lu...@microsoft.com>
        Gerrit-Reviewer: Mike West <mk...@chromium.org>
        Gerrit-Reviewer: Thomas Nguyen <tun...@chromium.org>
        Gerrit-CC: Andy Paicu <andy...@chromium.org>
        Gerrit-CC: Daniel Murphy <dmu...@chromium.org>
        Gerrit-CC: Kristin Lee <krist...@microsoft.com>
        Gerrit-CC: Permissions Reviews <permissio...@chromium.org>
        Gerrit-CC: Robert Paveza <Rob.P...@microsoft.com>
        Gerrit-Attention: Lu Huang <lu...@microsoft.com>
        Gerrit-Attention: Thomas Nguyen <tun...@chromium.org>
        Gerrit-Attention: Mike West <mk...@chromium.org>
        Gerrit-Comment-Date: Sat, 10 Jan 2026 02:30:11 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Mike West <mk...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages