IWA: Add IWA permissions policy cache [chromium/src : main]

0 views
Skip to first unread message

Zgroza (Luke) Klimek (Gerrit)

unread,
Dec 18, 2025, 2:46:39 PM (2 days ago) Dec 18
to Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
Attention needed from Andrew Rayskiy and Simon Hangl

Zgroza (Luke) Klimek voted and added 1 comment

Votes added by Zgroza (Luke) Klimek

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Zgroza (Luke) Klimek . resolved

@green...@google.com @sim...@chromium.org can You take a look? I have not yet rebased + chained the second CL but You two know the context anyway.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Rayskiy
  • Simon Hangl
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: I42428bd07434829bce530f12e75b2dae3f129450
Gerrit-Change-Number: 7275466
Gerrit-PatchSet: 4
Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
Gerrit-Reviewer: Simon Hangl <sim...@google.com>
Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@chromium.org>
Gerrit-Attention: Simon Hangl <sim...@google.com>
Gerrit-Attention: Andrew Rayskiy <green...@google.com>
Gerrit-Comment-Date: Thu, 18 Dec 2025 19:46:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Zgroza (Luke) Klimek (Gerrit)

unread,
Dec 18, 2025, 2:50:29 PM (2 days ago) Dec 18
to Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
Attention needed from Andrew Rayskiy, Simon Hangl and Zgroza (Luke) Klimek

Zgroza (Luke) Klimek voted and added 1 comment

Votes added by Zgroza (Luke) Klimek

Commit-Queue+1

1 comment

Patchset-level comments
Zgroza (Luke) Klimek . resolved

@green...@google.com @sim...@chromium.org can You take a look? I have not yet rebased + chained the second CL but You two know the context anyway.

Zgroza (Luke) Klimek

Sorry, I meant @sim...@google.com, Gerrit autocorrect failed me.

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Rayskiy
  • Simon Hangl
  • Zgroza (Luke) Klimek
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: I42428bd07434829bce530f12e75b2dae3f129450
Gerrit-Change-Number: 7275466
Gerrit-PatchSet: 4
Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
Gerrit-Reviewer: Simon Hangl <sim...@google.com>
Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@chromium.org>
Gerrit-Attention: Simon Hangl <sim...@google.com>
Gerrit-Attention: Andrew Rayskiy <green...@google.com>
Gerrit-Attention: Zgroza (Luke) Klimek <zgr...@chromium.org>
Gerrit-Comment-Date: Thu, 18 Dec 2025 19:50:08 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Zgroza (Luke) Klimek <zgr...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Zgroza (Luke) Klimek (Gerrit)

unread,
Dec 18, 2025, 2:51:53 PM (2 days ago) Dec 18
to Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
Attention needed from Andrew Rayskiy and Simon Hangl

Zgroza (Luke) Klimek voted and added 1 comment

Votes added by Zgroza (Luke) Klimek

Commit-Queue+1

1 comment

Commit Message
Line 11, Patchset 4 (Latest):This is not yet used in this commit, just populated (see chained CL).
Zgroza (Luke) Klimek . unresolved

(not yet, soon)

Open in Gerrit

Related details

Attention is currently required from:
  • Andrew Rayskiy
  • Simon Hangl
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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 4
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Andrew Rayskiy <green...@google.com>
    Gerrit-Comment-Date: Thu, 18 Dec 2025 19:51:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Rayskiy (Gerrit)

    unread,
    Dec 18, 2025, 7:26:34 PM (2 days ago) Dec 18
    to Zgroza (Luke) Klimek, Chromium LUCI CQ, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Simon Hangl and Zgroza (Luke) Klimek

    Andrew Rayskiy added 1 comment

    File chrome/browser/web_applications/isolated_web_apps/isolated_web_app_throttle.cc
    Andrew Rayskiy . unresolved

    Please fix this WARNING reported by Large Change: This change adds 325 lines of production code. Consider splitting this change in...

    This change adds 325 lines of production code. Consider splitting this change into smaller ones.
    Small changes get reviewed faster and more thoroughly, are less likely to introduce bugs, and are easier to roll back if needed.
    You can bypass this warning by adding 'BYPASS_LARGE_CHANGE_WARNING: <reason>' to the change description. (Google-internal: See go/large-change-nudge)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Simon Hangl
    • Zgroza (Luke) Klimek
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 4
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 00:26:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Rayskiy (Gerrit)

    unread,
    Dec 19, 2025, 5:09:30 AM (24 hours ago) Dec 19
    to Zgroza (Luke) Klimek, Chromium LUCI CQ, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Simon Hangl and Zgroza (Luke) Klimek

    Andrew Rayskiy added 1 comment

    File chrome/browser/web_applications/isolated_web_apps/isolated_web_app_throttle.cc
    Line 144, Patchset 4 (Latest): auto resource_request = std::make_unique<network::ResourceRequest>();
    Andrew Rayskiy . unresolved

    As discussed offline, I don't think that the throttle itself is the right place for the parsing code itself -- it's supposed to be a thin proxy that just defers the navigation on a set of external conditions (provider ready, component ready, policy cache entry ready) while avoiding unnecessary bloating. Please move this logic to the PPCache.

    Gerrit-Comment-Date: Fri, 19 Dec 2025 10:09:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Rayskiy (Gerrit)

    unread,
    Dec 19, 2025, 7:11:20 AM (22 hours ago) Dec 19
    to Zgroza (Luke) Klimek, Chromium LUCI CQ, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Simon Hangl and Zgroza (Luke) Klimek

    Andrew Rayskiy added 1 comment

    File chrome/browser/web_applications/isolated_web_apps/isolated_web_app_throttle.cc
    Line 127, Patchset 4 (Latest): if (!url_info.has_value() ||
    Andrew Rayskiy . unresolved

    https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/isolated_web_apps/commands/isolated_web_app_install_command_helper.cc;l=395-400;drc=9dc60c24f0c8fef8d8f1863f2ee3f38cffe00bf3;bpv=0;bpt=1

    You can use the presence of this web contents marker to skip the manifest parsing for installation-like events (update probing, update applying). This will also be much-much clearer to understand.

    Gerrit-Comment-Date: Fri, 19 Dec 2025 12:11:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zgroza (Luke) Klimek (Gerrit)

    unread,
    Dec 19, 2025, 9:13:20 AM (20 hours ago) Dec 19
    to Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Andrew Rayskiy and Simon Hangl

    Zgroza (Luke) Klimek added 2 comments

    File chrome/browser/web_applications/isolated_web_apps/isolated_web_app_throttle.cc
    Andrew Rayskiy . unresolved

    Please fix this WARNING reported by Large Change: This change adds 325 lines of production code. Consider splitting this change in...

    This change adds 325 lines of production code. Consider splitting this change into smaller ones.
    Small changes get reviewed faster and more thoroughly, are less likely to introduce bugs, and are easier to roll back if needed.
    You can bypass this warning by adding 'BYPASS_LARGE_CHANGE_WARNING: <reason>' to the change description. (Google-internal: See go/large-change-nudge)

    Zgroza (Luke) Klimek

    Not done yet, will do soon.

    Line 144, Patchset 4: auto resource_request = std::make_unique<network::ResourceRequest>();
    Andrew Rayskiy . resolved

    As discussed offline, I don't think that the throttle itself is the right place for the parsing code itself -- it's supposed to be a thin proxy that just defers the navigation on a set of external conditions (provider ready, component ready, policy cache entry ready) while avoiding unnecessary bloating. Please move this logic to the PPCache.

    Zgroza (Luke) Klimek

    Done. Also, removed the dependency on Mojo from this CL and related changes.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Rayskiy
    • Simon Hangl
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 5
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Andrew Rayskiy <green...@google.com>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 14:13:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andrew Rayskiy <green...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Rayskiy (Gerrit)

    unread,
    Dec 19, 2025, 9:27:22 AM (20 hours ago) Dec 19
    to Zgroza (Luke) Klimek, Chromium LUCI CQ, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Simon Hangl and Zgroza (Luke) Klimek

    Andrew Rayskiy added 9 comments

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.h
    Line 95, Patchset 5: : public BrowserContextKeyedServiceFactory {
    Andrew Rayskiy . unresolved
    Line 86, Patchset 5: std::map<url::Origin, CacheEntry> cache_;
    Andrew Rayskiy . unresolved

    base::flat_map

    Line 54, Patchset 5: explicit IwaPermissionsPolicyCache(Profile* profile);
    Andrew Rayskiy . unresolved

    Create from a `WebAppProvider*`; passing `Profile*` here is an antipattern (although an unavoidable one at times)

    Line 48, Patchset 5: std::string feature;
    Andrew Rayskiy . unresolved

    I'm 95% sure that a struct that simple doesn't need any constructors/operators.

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.cc
    Line 36, Patchset 5: // WebAppInstallManager is initialized within
    Andrew Rayskiy . unresolved

    This doesn't guarantee anything about the provider initialization (i.e. `on_ready()`). Yes, the `provider_` ptr will be valid, but that's just it.

    Line 46, Patchset 5: auto it = cache_.find(iwa_origin);
    Andrew Rayskiy . unresolved

    `base::FindOrNull()`

    Line 61, Patchset 5: std::optional<base::Value> json_value =
    Andrew Rayskiy . unresolved

    Move the parsing to a static func in an anon namespace 😊

    Line 128, Patchset 5: cache_.clear();
    Andrew Rayskiy . unresolved

    You should rather set the `provider_` to nullptr here to avoid being hit by the dangling ptr checker -- there's not much sense in clearing the cache here (as it will be immediately destroyed anyway).

    File chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.h
    Line 131, Patchset 5: ManifestBuilder& ClearPermissionsPolicy();
    Andrew Rayskiy . unresolved

    I'd rather have a different constructor for the ManifestBuilder (or just add an extra `include_coi_pp` boolean)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Simon Hangl
    • Zgroza (Luke) Klimek
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 5
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 14:27:04 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Rayskiy (Gerrit)

    unread,
    Dec 19, 2025, 9:37:16 AM (19 hours ago) Dec 19
    to Zgroza (Luke) Klimek, Chromium LUCI CQ, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Simon Hangl and Zgroza (Luke) Klimek

    Andrew Rayskiy added 1 comment

    File chrome/browser/web_applications/isolated_web_apps/isolated_web_app_throttle.cc
    Line 51, Patchset 6 (Parent): return PROCEED;
    Andrew Rayskiy . unresolved

    I'd rather keep this piece of code -- this saves one important callback hop on pretty much every navigation.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Simon Hangl
    • Zgroza (Luke) Klimek
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 6
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 14:36:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zgroza (Luke) Klimek (Gerrit)

    unread,
    Dec 19, 2025, 10:05:10 AM (19 hours ago) Dec 19
    to Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Andrew Rayskiy and Simon Hangl

    Zgroza (Luke) Klimek added 1 comment

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.cc
    Line 36, Patchset 5: // WebAppInstallManager is initialized within
    Andrew Rayskiy . unresolved

    This doesn't guarantee anything about the provider initialization (i.e. `on_ready()`). Yes, the `provider_` ptr will be valid, but that's just it.

    Zgroza (Luke) Klimek

    As I wrote in the comment, this does not only create the pointer but also calls `Start()` (literally, the next line of code after `make_unique`) which creates the `WebAppInstallManager`. See initialization [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider_factory.cc;drc=e94ce3f01b473c02658753bdd8502ad039ce1748;l=69) -> [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=165) -> [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=437) and creation in the constructor of the provider itself [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=157) -> [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=378).

    Unless the provider can be created somewhere outside of `WebAppProviderFactory::BuildServiceInstanceForBrowserContext` this should assure that the install manager is initialized and well. And even if somehow created from somewhere entirely else, install manager will be created in the constructor itself, so the pointer will be valid.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Rayskiy
    • Simon Hangl
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 7
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Andrew Rayskiy <green...@google.com>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 15:04:57 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andrew Rayskiy <green...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zgroza (Luke) Klimek (Gerrit)

    unread,
    Dec 19, 2025, 10:09:32 AM (19 hours ago) Dec 19
    to Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Andrew Rayskiy and Simon Hangl

    Zgroza (Luke) Klimek added 2 comments

    Commit Message
    Line 11, Patchset 4:This is not yet used in this commit, just populated (see chained CL).
    Zgroza (Luke) Klimek . resolved

    (not yet, soon)

    Zgroza (Luke) Klimek

    Done

    File chrome/browser/web_applications/isolated_web_apps/isolated_web_app_throttle.cc
    Andrew Rayskiy . resolved

    I'd rather keep this piece of code -- this saves one important callback hop on pretty much every navigation.

    Zgroza (Luke) Klimek

    Resolving as this is split to another CL. Added comment there: https://chromium-review.googlesource.com/c/chromium/src/+/7280970/comment/f0f98492_8a07809d/

    Gerrit-Comment-Date: Fri, 19 Dec 2025 15:09:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Andrew Rayskiy <green...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zgroza (Luke) Klimek (Gerrit)

    unread,
    Dec 19, 2025, 10:53:08 AM (18 hours ago) Dec 19
    to Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Andrew Rayskiy and Simon Hangl

    Zgroza (Luke) Klimek added 10 comments

    File chrome/browser/web_applications/isolated_web_apps/isolated_web_app_throttle.cc
    File-level comment, Patchset 4:
    Andrew Rayskiy . resolved

    Please fix this WARNING reported by Large Change: This change adds 325 lines of production code. Consider splitting this change in...

    This change adds 325 lines of production code. Consider splitting this change into smaller ones.
    Small changes get reviewed faster and more thoroughly, are less likely to introduce bugs, and are easier to roll back if needed.
    You can bypass this warning by adding 'BYPASS_LARGE_CHANGE_WARNING: <reason>' to the change description. (Google-internal: See go/large-change-nudge)

    Zgroza (Luke) Klimek

    Not done yet, will do soon.

    Zgroza (Luke) Klimek

    Done

    Line 127, Patchset 4: if (!url_info.has_value() ||
    Andrew Rayskiy . resolved

    https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/isolated_web_apps/commands/isolated_web_app_install_command_helper.cc;l=395-400;drc=9dc60c24f0c8fef8d8f1863f2ee3f38cffe00bf3;bpv=0;bpt=1

    You can use the presence of this web contents marker to skip the manifest parsing for installation-like events (update probing, update applying). This will also be much-much clearer to understand.

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.h
    Line 95, Patchset 5: : public BrowserContextKeyedServiceFactory {
    Andrew Rayskiy . resolved
    Zgroza (Luke) Klimek

    Uh, useful. Done.

    Line 86, Patchset 5: std::map<url::Origin, CacheEntry> cache_;
    Andrew Rayskiy . resolved

    base::flat_map

    Zgroza (Luke) Klimek

    Done

    Line 54, Patchset 5: explicit IwaPermissionsPolicyCache(Profile* profile);
    Andrew Rayskiy . resolved

    Create from a `WebAppProvider*`; passing `Profile*` here is an antipattern (although an unavoidable one at times)

    Zgroza (Luke) Klimek

    Done

    Line 48, Patchset 5: std::string feature;
    Andrew Rayskiy . resolved

    I'm 95% sure that a struct that simple doesn't need any constructors/operators.

    Zgroza (Luke) Klimek

    Alas, `error: [chromium-style] Complex class/struct needs an explicit out-of-line constructor.`. I also do not like it, would not do this unless necessary :(

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.cc
    Line 46, Patchset 5: auto it = cache_.find(iwa_origin);
    Andrew Rayskiy . resolved

    `base::FindOrNull()`

    Zgroza (Luke) Klimek

    Oh, that's useful! Done.

    Line 61, Patchset 5: std::optional<base::Value> json_value =
    Andrew Rayskiy . resolved

    Move the parsing to a static func in an anon namespace 😊

    Zgroza (Luke) Klimek

    Done

    Line 128, Patchset 5: cache_.clear();
    Andrew Rayskiy . resolved

    You should rather set the `provider_` to nullptr here to avoid being hit by the dangling ptr checker -- there's not much sense in clearing the cache here (as it will be immediately destroyed anyway).

    Zgroza (Luke) Klimek

    Done

    File chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.h
    Line 131, Patchset 5: ManifestBuilder& ClearPermissionsPolicy();
    Andrew Rayskiy . resolved

    I'd rather have a different constructor for the ManifestBuilder (or just add an extra `include_coi_pp` boolean)

    Zgroza (Luke) Klimek

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Rayskiy
    • Simon Hangl
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 8
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Andrew Rayskiy <green...@google.com>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 15:52:50 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zgroza (Luke) Klimek (Gerrit)

    unread,
    Dec 19, 2025, 10:53:16 AM (18 hours ago) Dec 19
    to Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Andrew Rayskiy and Simon Hangl

    Zgroza (Luke) Klimek voted Commit-Queue+1

    Commit-Queue+1
    Gerrit-Comment-Date: Fri, 19 Dec 2025 15:53:03 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Rayskiy (Gerrit)

    unread,
    Dec 19, 2025, 11:18:11 AM (18 hours ago) Dec 19
    to Zgroza (Luke) Klimek, Chromium LUCI CQ, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Simon Hangl and Zgroza (Luke) Klimek

    Andrew Rayskiy added 5 comments

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.h
    Line 86, Patchset 8: base::flat_map<url::Origin, CacheEntry> cache_;
    Andrew Rayskiy . unresolved

    I'd rather have a map from a `SignedWebBundleId` for type guarantees 😊

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.cc
    Line 36, Patchset 5: // WebAppInstallManager is initialized within
    Andrew Rayskiy . unresolved

    This doesn't guarantee anything about the provider initialization (i.e. `on_ready()`). Yes, the `provider_` ptr will be valid, but that's just it.

    Zgroza (Luke) Klimek

    As I wrote in the comment, this does not only create the pointer but also calls `Start()` (literally, the next line of code after `make_unique`) which creates the `WebAppInstallManager`. See initialization [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider_factory.cc;drc=e94ce3f01b473c02658753bdd8502ad039ce1748;l=69) -> [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=165) -> [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=437) and creation in the constructor of the provider itself [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=157) -> [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=378).

    Unless the provider can be created somewhere outside of `WebAppProviderFactory::BuildServiceInstanceForBrowserContext` this should assure that the install manager is initialized and well. And even if somehow created from somewhere entirely else, install manager will be created in the constructor itself, so the pointer will be valid.

    Andrew Rayskiy
    Line 56, Patchset 7:bool IwaPermissionsPolicyCache::ParseManifestAndSetPolicy(
    Andrew Rayskiy . unresolved

    Cross-referencing it here. Can't we just have a `ObtainManifestAndCache(origin, callback)` method and hide the URL request impl here?

    Line 93, Patchset 8: permissions_policy.push_back({key, std::move(allowed_origins)});
    Andrew Rayskiy . unresolved

    Please fix this WARNING reported by ClangTidy: check: modernize-use-emplace

    use emplace_back instead of push_back (https://cla...

    check: modernize-use-emplace

    use emplace_back instead of push_back (https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html)

    (Note: You can add `Skip-Clang-Tidy-Checks: modernize-use-emplace` footer to the CL description to skip the check)

    (Lint observed on `linux-clang-tidy-rel`, but not on `android-clang-tidy-rel`)

    Line 121, Patchset 8:bool IwaPermissionsPolicyCache::ParseManifestAndSetPolicy(
    Andrew Rayskiy . unresolved

    Ideally I'd prefer a `base::expected<>` here. But that's more of a nit

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Simon Hangl
    • Zgroza (Luke) Klimek
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 9
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 16:17:54 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zgroza (Luke) Klimek (Gerrit)

    unread,
    Dec 19, 2025, 11:50:05 AM (17 hours ago) Dec 19
    to Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Andrew Rayskiy and Simon Hangl

    Zgroza (Luke) Klimek added 4 comments

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.cc
    Line 36, Patchset 5: // WebAppInstallManager is initialized within
    Andrew Rayskiy . unresolved

    This doesn't guarantee anything about the provider initialization (i.e. `on_ready()`). Yes, the `provider_` ptr will be valid, but that's just it.

    Zgroza (Luke) Klimek

    As I wrote in the comment, this does not only create the pointer but also calls `Start()` (literally, the next line of code after `make_unique`) which creates the `WebAppInstallManager`. See initialization [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider_factory.cc;drc=e94ce3f01b473c02658753bdd8502ad039ce1748;l=69) -> [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=165) -> [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=437) and creation in the constructor of the provider itself [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=157) -> [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=378).

    Unless the provider can be created somewhere outside of `WebAppProviderFactory::BuildServiceInstanceForBrowserContext` this should assure that the install manager is initialized and well. And even if somehow created from somewhere entirely else, install manager will be created in the constructor itself, so the pointer will be valid.

    Andrew Rayskiy

    The road roller will crush you [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=203). As I said, please add a hop via `on_registry_ready()`.

    Zgroza (Luke) Klimek

    No, it will not. I just provided You with the exact call path that also sets `connected_` [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=460). It is impossible to have `connected_` as `false` if both services were created using their factories.

    Line 56, Patchset 7:bool IwaPermissionsPolicyCache::ParseManifestAndSetPolicy(
    Andrew Rayskiy . resolved

    Cross-referencing it here. Can't we just have a `ObtainManifestAndCache(origin, callback)` method and hide the URL request impl here?

    Zgroza (Luke) Klimek

    I wanted to keep it out of here. But maybe that's alright. Though this is bulky, will add this in the next CL, this one is for parsing and is already big enough.

    Line 93, Patchset 8: permissions_policy.push_back({key, std::move(allowed_origins)});
    Andrew Rayskiy . resolved

    Please fix this WARNING reported by ClangTidy: check: modernize-use-emplace

    use emplace_back instead of push_back (https://cla...

    check: modernize-use-emplace

    use emplace_back instead of push_back (https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html)

    (Note: You can add `Skip-Clang-Tidy-Checks: modernize-use-emplace` footer to the CL description to skip the check)

    (Lint observed on `linux-clang-tidy-rel`, but not on `android-clang-tidy-rel`)

    Zgroza (Luke) Klimek

    Already fixed as of the time when You wrote this comment.

    Line 121, Patchset 8:bool IwaPermissionsPolicyCache::ParseManifestAndSetPolicy(
    Andrew Rayskiy . resolved

    Ideally I'd prefer a `base::expected<>` here. But that's more of a nit

    Zgroza (Luke) Klimek

    I though of this too. But:

    • There's no actual information that this returns, so nothing to put in `<>`.
    • There's nothing really that could be easily done with more details on the error code here.
    • This being `false` is a corner case that should absolutely never happen, the only scenarios that I can come up with is IWA being corrupted on disk or dev proxy case. I even wondered whether not to make this a `CHECK`, but thought that killing the browser might be too much in case there is some corner case unknown to me.
    • So, in short, I'd rather just keep this as `bool`.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Rayskiy
    • Simon Hangl
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 10
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Andrew Rayskiy <green...@google.com>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 16:49:46 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Zgroza (Luke) Klimek (Gerrit)

    unread,
    Dec 19, 2025, 1:43:34 PM (15 hours ago) Dec 19
    to Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Andrew Rayskiy and Simon Hangl

    Zgroza (Luke) Klimek added 1 comment

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.h
    Line 86, Patchset 8: base::flat_map<url::Origin, CacheEntry> cache_;
    Andrew Rayskiy . unresolved

    I'd rather have a map from a `SignedWebBundleId` for type guarantees 😊

    Zgroza (Luke) Klimek

    This would add some irritating conversions. But it's already guaranteed in the next CL when I left only one public method for setting this, and this method does everything E2E, so also downloads the manifest. Thus, it's impossible to set anything other than an IWA there. Would that be acceptable?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Rayskiy
    • Simon Hangl
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 11
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Andrew Rayskiy <green...@google.com>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 18:43:15 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Robbie McElrath (Gerrit)

    unread,
    Dec 19, 2025, 3:39:52 PM (13 hours ago) Dec 19
    to Zgroza (Luke) Klimek, Chromium LUCI CQ, Andrew Rayskiy, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Andrew Rayskiy, Simon Hangl and Zgroza (Luke) Klimek

    Robbie McElrath added 2 comments

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.h
    Line 64, Patchset 11 (Latest): void SetPolicy(const url::Origin& iwa_origin, CacheEntry policy);
    Robbie McElrath . unresolved

    Does this need to be public?

    File chrome/browser/web_applications/isolated_web_apps/test/isolated_web_app_builder.h
    Line 102, Patchset 11 (Latest): bool include_cross_origin_isolated_permissions_policy = true);
    Robbie McElrath . unresolved

    Is this used anywhere?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Andrew Rayskiy
    • Simon Hangl
    • Zgroza (Luke) Klimek
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 11
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Robbie McElrath <rmce...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Andrew Rayskiy <green...@google.com>
    Gerrit-Attention: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 20:39:42 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Andrew Rayskiy (Gerrit)

    unread,
    Dec 19, 2025, 5:26:32 PM (12 hours ago) Dec 19
    to Zgroza (Luke) Klimek, Robbie McElrath, Chromium LUCI CQ, Simon Hangl, Simon Hangl, AyeAye, chromium...@chromium.org, creis...@chromium.org, navigation...@chromium.org, alexmo...@chromium.org, pwa-com...@google.com, blink-re...@chromium.org, blink-...@chromium.org, dibyapal+wa...@chromium.org, dmurph+watc...@chromium.org, ipc-securi...@chromium.org, kinuko...@chromium.org, kuragin+web-ap...@chromium.org, loyso...@chromium.org, mgiuca...@chromium.org, philli...@chromium.org, rmcelra...@chromium.org, webap...@microsoft.com, zelin+watch-we...@chromium.org
    Attention needed from Simon Hangl and Zgroza (Luke) Klimek

    Andrew Rayskiy voted and added 5 comments

    Votes added by Andrew Rayskiy

    Code-Review+1
    Owners-Override+1

    5 comments

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.h
    Line 86, Patchset 8: base::flat_map<url::Origin, CacheEntry> cache_;
    Andrew Rayskiy . unresolved

    I'd rather have a map from a `SignedWebBundleId` for type guarantees 😊

    Zgroza (Luke) Klimek

    This would add some irritating conversions. But it's already guaranteed in the next CL when I left only one public method for setting this, and this method does everything E2E, so also downloads the manifest. Thus, it's impossible to set anything other than an IWA there. Would that be acceptable?

    Line 48, Patchset 5: std::string feature;
    Andrew Rayskiy . unresolved

    I'm 95% sure that a struct that simple doesn't need any constructors/operators.

    Zgroza (Luke) Klimek

    Alas, `error: [chromium-style] Complex class/struct needs an explicit out-of-line constructor.`. I also do not like it, would not do this unless necessary :(

    Andrew Rayskiy

    Yeah, but I'm 99.9% sure that it doesn't force you to provide copy and the defaulted ==.

    File chrome/browser/web_applications/isolated_web_apps/iwa_permissions_policy_cache.cc
    Line 36, Patchset 5: // WebAppInstallManager is initialized within
    Andrew Rayskiy . resolved

    This doesn't guarantee anything about the provider initialization (i.e. `on_ready()`). Yes, the `provider_` ptr will be valid, but that's just it.

    Zgroza (Luke) Klimek

    As I wrote in the comment, this does not only create the pointer but also calls `Start()` (literally, the next line of code after `make_unique`) which creates the `WebAppInstallManager`. See initialization [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider_factory.cc;drc=e94ce3f01b473c02658753bdd8502ad039ce1748;l=69) -> [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=165) -> [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=437) and creation in the constructor of the provider itself [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=157) -> [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=378).

    Unless the provider can be created somewhere outside of `WebAppProviderFactory::BuildServiceInstanceForBrowserContext` this should assure that the install manager is initialized and well. And even if somehow created from somewhere entirely else, install manager will be created in the constructor itself, so the pointer will be valid.

    Andrew Rayskiy

    The road roller will crush you [here](https://source.chromium.org/chromium/chromium/src/+/main:chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=203). As I said, please add a hop via `on_registry_ready()`.

    Zgroza (Luke) Klimek

    No, it will not. I just provided You with the exact call path that also sets `connected_` [here](https://crsrc.org/c/chrome/browser/web_applications/web_app_provider.cc;drc=f0821f47fc30afab8eeae78ea1d689480e0d5f6a;l=460). It is impossible to have `connected_` as `false` if both services were created using their factories.

    Andrew Rayskiy

    Sheesh. You really got me there...

    Line 93, Patchset 8: permissions_policy.push_back({key, std::move(allowed_origins)});
    Andrew Rayskiy . unresolved

    Please fix this WARNING reported by ClangTidy: check: modernize-use-emplace

    use emplace_back instead of push_back (https://cla...

    check: modernize-use-emplace

    use emplace_back instead of push_back (https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-emplace.html)

    (Note: You can add `Skip-Clang-Tidy-Checks: modernize-use-emplace` footer to the CL description to skip the check)

    (Lint observed on `linux-clang-tidy-rel`, but not on `android-clang-tidy-rel`)

    Zgroza (Luke) Klimek

    Already fixed as of the time when You wrote this comment.

    Andrew Rayskiy

    No? Still `push_back`

    Line 145, Patchset 8:void IwaPermissionsPolicyCache::OnWebAppManifestUpdated(
    Andrew Rayskiy . unresolved

    nit: space

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Simon Hangl
    • Zgroza (Luke) Klimek
    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: I42428bd07434829bce530f12e75b2dae3f129450
    Gerrit-Change-Number: 7275466
    Gerrit-PatchSet: 11
    Gerrit-Owner: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Reviewer: Andrew Rayskiy <green...@google.com>
    Gerrit-Reviewer: Simon Hangl <sim...@google.com>
    Gerrit-Reviewer: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-CC: Robbie McElrath <rmce...@chromium.org>
    Gerrit-CC: Simon Hangl <sim...@chromium.org>
    Gerrit-Attention: Simon Hangl <sim...@google.com>
    Gerrit-Attention: Zgroza (Luke) Klimek <zgr...@chromium.org>
    Gerrit-Comment-Date: Fri, 19 Dec 2025 22:26:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages