Skip to content

DRM Policy: Add pixels - #9564

Merged
0nko merged 3 commits into
developfrom
feature/ondrej/drm-policy-pixels
Aug 22, 2026
Merged

DRM Policy: Add pixels#9564
0nko merged 3 commits into
developfrom
feature/ondrej/drm-policy-pixels

Conversation

@0nko

@0nko 0nko commented Aug 20, 2026

Copy link
Copy Markdown
Member

Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1217678542848175?focus=true
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/1207418217763355/task/1216952383692269?focus=true

Description

This PR adds a pixel to measure the auto-approved DRM permissions.

Steps to test this PR

Setup

Test privacy config URL: https://gist.githubusercontent.com/0nko/6ba6564e43ec35095a08c0e2288bbdde/raw/3eb9c38d461e73739ebc0d84f7c352cb9d7082d1/privacyconfig.json ("foxnews.com" in eme and "reference.dashif.org" in emeBlock)

Pixel fires for an allow-list grant (test config)

  • Open https://www.foxnews.com/video
  • Verify the decision log shows action=GRANT, reason=ALLOW_LIST
  • Verify a pixel is sent: Pixel sent: m_site_permissions_auto_granted with params: {type=drm, reason=allow_list}

Pixel fires for a protections-off grant (test config)

  • Open https://reference.dashif.org/dash.js/latest/samples/drm/widevine.html and confirm reason=BLOCK_LIST
  • Open the privacy dashboard (shield) and switch Protections OFF
  • Force-stop and reopen the app, reload the page
  • Verify action=GRANT, reason=PROTECTIONS_OFF and Pixel sent: m_site_permissions_auto_granted with params: {type=drm, reason=protections_off}

No pixel for user-driven grants

  • Turn protections back on
  • Go to "cnn.com" and open a video article
  • Choose Allow with "Remember my choice" in the DRM dialog
  • Reload and verify action=GRANT, reason=USER_ALLOW_ALWAYS
  • Verify no m_site_permissions_auto_granted pixel is sent — the user made this choice, it is not an automatic grant

Note

Low Risk
Telemetry and feature-flag default/annotation tweaks only; DRM grant behavior is unchanged.

Overview
Adds m_site_permissions_auto_granted so DRM grants from the central policy (allow-list or protections-off) can be compared with dialog impressions.

The pixel fires once per tab/domain via DrmSessionStore.markAutoGrantReported. User-driven grants (USER_ALLOW_ALWAYS) and non-GRANT decisions are not counted.

Also switches drmPolicy / centralPolicy to @InternalAlwaysEnabled with a default of FALSE.

Reviewed by Cursor Bugbot for commit dee4427. Bugbot is set up for automated code reviews on this repo. Configure here.

@0nko
0nko force-pushed the feature/ondrej/drm-policy-pixels branch from a60bdbc to f8ef345 Compare August 20, 2026 23:12
@0nko
0nko requested a review from anikiki August 20, 2026 23:13
@0nko
0nko force-pushed the feature/ondrej/drm-policy-pixels branch from f8ef345 to 70cef02 Compare August 20, 2026 23:15
@github-actions

Copy link
Copy Markdown
Contributor

Privacy Review task: https://app.asana.com/0/69071770703008/1217701699737477

@0nko
0nko force-pushed the feature/ondrej/drm-policy-pixels branch 2 times, most recently from 38089ab to a3b9c5b Compare August 21, 2026 12:08
@0nko
0nko force-pushed the feature/ondrej/drm-policy-pixels branch from a3b9c5b to 7f13ba0 Compare August 21, 2026 12:51
@anikiki anikiki self-assigned this Aug 21, 2026

@anikiki anikiki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base automatically changed from feature/ondrej/drm-policy-manager to develop August 22, 2026 11:24
@0nko
0nko force-pushed the feature/ondrej/drm-policy-pixels branch from db6fd61 to dee4427 Compare August 22, 2026 11:24
@0nko
0nko added this pull request to the merge queue Aug 22, 2026
Merged via the queue into develop with commit 65e9bc4 Aug 22, 2026
20 checks passed
@0nko
0nko deleted the feature/ondrej/drm-policy-pixels branch August 22, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants