Skip to content

Add Media Session metric (uplift to 1.88.x)#34596

Merged
kjozwiak merged 2 commits into1.88.xfrom
media-session-p3a-1.88.x
Mar 11, 2026
Merged

Add Media Session metric (uplift to 1.88.x)#34596
kjozwiak merged 2 commits into1.88.xfrom
media-session-p3a-1.88.x

Conversation

@DJAndries
Copy link
Collaborator

Resolves brave/brave-browser#53264
Uplift of #34334
Uplift of #34509

* Add "is default" metric attribute

* Address PR feedback

* Use `static_library` for `default_browser_monitor`

* Address PR feedback

* Add Media Session metric
@DJAndries DJAndries requested a review from a team as a code owner March 10, 2026 05:24
* Media session P3A fix wip

* Move `MediaSessionMetrics` to browser/misc_metrics

* Update test

* Code follow ups

* Expand uptime monitor to record 8 days

* Revert "Expand uptime monitor to record 8 days"

This reverts commit 00dd9f1.

* Use TimeDelta prefs instead of TPS

* Make Session final
@DJAndries DJAndries force-pushed the media-session-p3a-1.88.x branch from 4b43569 to c4ddaa1 Compare March 10, 2026 18:47
@brave-builds
Copy link
Collaborator

Warning

You have got a presubmit warning. Please address it if possible.

A banned pattern was used.
    browser/misc_metrics/page_metrics_tab_helper.cc:86:
      Do not use this method. It is invoked half-way through the destructor of WebContentsImpl and using it often results in crashes or surprising behavior. Conceptually, this is only necessary by objects that depend on, but outlive the WebContents. These objects should instead coordinate with the owner of the WebContents which is responsible for destroying the WebContents.

@brave-builds
Copy link
Collaborator

Warning

You have got a presubmit warning. Please address it if possible.

A banned pattern was used.
    browser/misc_metrics/page_metrics_tab_helper.h:42:
      Do not use this method. It is invoked half-way through the destructor of WebContentsImpl and using it often results in crashes or surprising behavior. Conceptually, this is only necessary by objects that depend on, but outlive the WebContents. These objects should instead coordinate with the owner of the WebContents which is responsible for destroying the WebContents.

@kjozwiak kjozwiak added this to the 1.88.x - Release milestone Mar 11, 2026
Copy link
Member

@kjozwiak kjozwiak left a comment

Choose a reason for hiding this comment

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

Uplift into 1.88.x approved 👍 QA has verified the PR on Nightly using 1.90.x as per #34509 (comment).

@kjozwiak kjozwiak merged commit 05b1205 into 1.88.x Mar 11, 2026
20 checks passed
@kjozwiak kjozwiak deleted the media-session-p3a-1.88.x branch March 11, 2026 05:59
@brave-builds
Copy link
Collaborator

Released in v1.88.127

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants