[<install> Element] Add manifest attribute support and plumbing [chromium/src : main]

0 views
Skip to first unread message

Lia Hiscock (Gerrit)

unread,
Jun 24, 2026, 12:43:13 PM (14 hours ago) Jun 24
to Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, japhet+...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
Attention needed from Robert Paveza

Lia Hiscock added 1 comment

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

Hi Rob! Looking for internal review here as well.

Open in Gerrit

Related details

Attention is currently required from:
  • Robert Paveza
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: I0a29a892242d439a54691ba41df9c18c7c8e7faa
Gerrit-Change-Number: 7987416
Gerrit-PatchSet: 8
Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
Gerrit-Attention: Robert Paveza <Rob.P...@microsoft.com>
Gerrit-Comment-Date: Wed, 24 Jun 2026 16:42:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Robert Paveza (Gerrit)

unread,
Jun 24, 2026, 1:26:40 PM (13 hours ago) Jun 24
to Lia Hiscock, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, japhet+...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
Attention needed from Lia Hiscock

Robert Paveza added 3 comments

File chrome/browser/web_applications/web_install_service_impl.cc
Line 326, Patchset 8 (Latest): NOTIMPLEMENTED();
Robert Paveza . unresolved

Is this being done in another CL?

I'm trying to understand why the WebInstallServiceImpl would need to know why the install action is coming from an element vs why the element wouldn't just call the InstallFromManifest function. This is how we've discussed speccing the behavior ("the install action is the same irrespective of whether it comes from n.i() or the element"), right? Is the delta concerning the permission?

If the delta is whether the UA should raise a permission prompt, I don't think that's really a significant point. The bottom line IMO is "a compromised renderer is a compromised renderer" -- which is to say, if the renderer is compromised, then the renderer telling the UA "no it's okay to bypass the permission check" by calling "ElementInstallFromManifest" instead of "InstallFromManifest" is questionable.

I think we've discussed when an <install> element is constructed, it should obtain a token from the browser process (I think the internal name of this is UnguessableToken) which is associated with that element. This would require a bit of negotiation at bootstrapping time:

  renderer: "heyyyyyy I have an <install> element"
browser: "ok here's a token, I'll remember - don't try to trick me later!"
renderer: "yo, my person clicked my install element, fr fr, here's the token"

Now it's not clear to me that EVEN THIS is really that "trustworthy," but at least with an n.i() call, it would be challenging to find that specific token in the memory structure (or if you're not using the <install> element at all, there would be no such token in the browser process).

Then, the ManifestInstallOptions mojo structure can include an optional token. For n.i(), you don't include the token; for the element, you do. If the token is included but not valid, it's rejected (maybe we even actively tear down the renderer because it seems compromised). If it's not included, that gives you the logic of whether to present the permissions prompt.

File third_party/blink/renderer/core/html/html_install_element.cc
Line 215, Patchset 8 (Latest): // manifestid alone is not supported; silent no-op.
Robert Paveza . unresolved

Hmm, a silent no-op feels wrong. "Incorrect input parameters" is a developer error -- we should invoke the manifest install result handler with an error condition (probably a DataError or TypeError).

File third_party/blink/renderer/modules/web_install/navigator_web_install_test.cc
Line 73, Patchset 8 (Latest): NOTIMPLEMENTED();
Robert Paveza . unresolved

Is this coming soon or coming later?

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: I0a29a892242d439a54691ba41df9c18c7c8e7faa
    Gerrit-Change-Number: 7987416
    Gerrit-PatchSet: 8
    Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
    Gerrit-Attention: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Comment-Date: Wed, 24 Jun 2026 17:26:26 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lia Hiscock (Gerrit)

    unread,
    Jun 24, 2026, 2:27:24 PM (12 hours ago) Jun 24
    to Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, japhet+...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org

    Lia Hiscock added 2 comments

    File third_party/blink/renderer/core/html/html_install_element.cc
    Line 215, Patchset 8: // manifestid alone is not supported; silent no-op.
    Robert Paveza . resolved

    Hmm, a silent no-op feels wrong. "Incorrect input parameters" is a developer error -- we should invoke the manifest install result handler with an error condition (probably a DataError or TypeError).

    Lia Hiscock

    Yeah, that's fair...This case was handled inadvertently in the old world by `GetCheckedInstallOptions`, but changed with the logic to handle both installurl/manifestid and manifest/manifestid.

    I've added back explicit handling here - using `HandleInstallDataError` + `PromptDismiss`, as was used before.

    note - this is part of the error handling that will change anyway with Kristin's CL

    File third_party/blink/renderer/modules/web_install/navigator_web_install_test.cc
    Line 73, Patchset 8: NOTIMPLEMENTED();
    Robert Paveza . resolved

    Is this coming soon or coming later?

    Lia Hiscock

    Not coming at all!

    This is the `navigator_web_install test`, so the `ElementInstall...` is not expected to be used. And vice versa in the `html_install_element_test`.

    Open in Gerrit

    Related details

    Attention set is empty
    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: I0a29a892242d439a54691ba41df9c18c7c8e7faa
    Gerrit-Change-Number: 7987416
    Gerrit-PatchSet: 9
    Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
    Gerrit-Comment-Date: Wed, 24 Jun 2026 18:27:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Robert Paveza <Rob.P...@microsoft.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lia Hiscock (Gerrit)

    unread,
    Jun 24, 2026, 6:02:37 PM (9 hours ago) Jun 24
    to Robert Paveza, Chromium LUCI CQ, chromium...@chromium.org, aixba+wat...@chromium.org, blink-re...@chromium.org, blink-rev...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, japhet+...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mek+w...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Robert Paveza

    Lia Hiscock added 2 comments

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

    I've rebased so the ElementInstallFromManifest should be clearer now!

    File chrome/browser/web_applications/web_install_service_impl.cc
    Line 326, Patchset 8: NOTIMPLEMENTED();
    Robert Paveza . unresolved

    Is this being done in another CL?

    I'm trying to understand why the WebInstallServiceImpl would need to know why the install action is coming from an element vs why the element wouldn't just call the InstallFromManifest function. This is how we've discussed speccing the behavior ("the install action is the same irrespective of whether it comes from n.i() or the element"), right? Is the delta concerning the permission?

    If the delta is whether the UA should raise a permission prompt, I don't think that's really a significant point. The bottom line IMO is "a compromised renderer is a compromised renderer" -- which is to say, if the renderer is compromised, then the renderer telling the UA "no it's okay to bypass the permission check" by calling "ElementInstallFromManifest" instead of "InstallFromManifest" is questionable.

    I think we've discussed when an <install> element is constructed, it should obtain a token from the browser process (I think the internal name of this is UnguessableToken) which is associated with that element. This would require a bit of negotiation at bootstrapping time:

      renderer: "heyyyyyy I have an <install> element"
    browser: "ok here's a token, I'll remember - don't try to trick me later!"
    renderer: "yo, my person clicked my install element, fr fr, here's the token"

    Now it's not clear to me that EVEN THIS is really that "trustworthy," but at least with an n.i() call, it would be challenging to find that specific token in the memory structure (or if you're not using the <install> element at all, there would be no such token in the browser process).

    Then, the ManifestInstallOptions mojo structure can include an optional token. For n.i(), you don't include the token; for the element, you do. If the token is included but not valid, it's rejected (maybe we even actively tear down the renderer because it seems compromised). If it's not included, that gives you the logic of whether to present the permissions prompt.

    Lia Hiscock

    Discussed offline, recapping for the record -

    ### Re. ElementInstallFromManifest/InstallFromManifest

    The split follows the convention we set with the install_url path - the 2 mojo functions are just thin wrappers that both call into the same WebInstallServiceImpl internal function, to avoid adding a load bearing bool to the mojo signatures -

    • `InstallFromManifest` / `ElementInstallFromManifest` -> `InstallFromManifestInternal`
    • `Install` / `InstallFromElement` --> `InstallInternal`

    The `Element` versions pass an additional bool `triggered_from_element_` (already in `InstallInternal`, coming soon to `InstallFromManifestInternal`) to the `Install[FromManifest]Internal` that's used primarily for metrics, but also to decide whether to skip the permission prompt.

    Granted, "skip the permission prompt" has been a source of AI-identified bugs (having a renderer path that allows skipping the prompt), but the entire premise of the PEPC elements is that no additional permission prompt is needed, so for well-behaving renderers, there must be a path to "show the install dialog directly, no permission prompt"

    ### Re. base::UnguessableToken -

    The PEPC elements already provide some degree of "identification with the browser" guarantee - [HTMLCapabilityElementBase::is_registered_in_browser_process_](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/html/html_capability_element_base.cc;l=1070?q=is_registered_in_browser_process_&ss=chromium).

    This bool is only `true` if the page is under the allowed count of same-type elements - [kMaxPEPCPerPage or kMaxInstallPerPage](https://source.chromium.org/chromium/chromium/src/+/main:content/browser/permissions/embedded_permission_control_checker.cc;l=25-26?q=kMaxPEPCPerPage&ss=chromium) - this count is enforced by the browser.

    **<install> is already compliant with this count limit - https://chromium-review.googlesource.com/c/chromium/src/+/7256736**

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Robert Paveza
    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: I0a29a892242d439a54691ba41df9c18c7c8e7faa
    Gerrit-Change-Number: 7987416
    Gerrit-PatchSet: 10
    Gerrit-Owner: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Lia Hiscock <liahi...@microsoft.com>
    Gerrit-Reviewer: Robert Paveza <Rob.P...@microsoft.com>
    Gerrit-Attention: Robert Paveza <Rob.P...@microsoft.com>
    Gerrit-Comment-Date: Wed, 24 Jun 2026 22:02:22 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages