
What: Check privacy sandbox settings for interestGroups(). How: 1. Add `browser_context` to the `IsInterestGroupAPIAllowed()` parameters to get the `PrivacySandboxSettings` for general permission check. This is because `render_frame_host` can be null (e.g., due to the initiator frame being destroyed and the worklet is in keep-alive phase). In this case, certain operations like console error will be skipped, but the core permission check will still be performed. 2. Introduce and use a new InterestGroupApiOperation::kRead type. Bug: 367992703 Change-Id: I9e1b44efc3f67a408433e6284be82197bb594a73 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5936920 Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Reviewed-by: Russ Hamilton <behamilton@google.com> Reviewed-by: Fiona Macintosh <fmacintosh@google.com> Reviewed-by: Ben Kelly <wanderview@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Commit-Queue: Yao Xiao <yaoxia@chromium.org> Cr-Commit-Position: refs/heads/main@{#1370140}