Serg e7fa442510 DayZeroBrowserUIExptManager crashes when P3A is toggled off-on-off (#34370)
fix: DayZeroBrowserUIExptManager crashes when P3A is toggled off-on-off

ResetBrowserUIStateForAllProfiles() was resetting observation_ when P3A
was disabled, but SetDayZeroBrowserUIForAllProfiles() never re-established
it when P3A was re-enabled. Toggling P3A off a second time hit the
CHECK(observation_.IsObserving()) because the observation was already reset.

Remove the observation_.Reset() from ResetBrowserUIStateForAllProfiles().
It's unnecessary because OnProfileAdded() already guards on IsP3AEnabled(),
making it a no-op when P3A is off.

Also destroy the p3a_enabled_ pref subscription in
OnProfileManagerDestroying() to prevent the callback from firing after
the ProfileManager is gone.

Resolves: https://github.com/brave/brave-browser/issues/53294
2026-03-03 15:30:10 +00:00
2026-02-26 14:14:53 +00:00
2026-03-02 17:18:22 +00:00
2026-03-03 14:24:22 +00:00
2026-03-03 14:28:30 +00:00
2026-03-03 14:28:30 +00:00
2026-03-03 14:28:30 +00:00

Brave Core

Brave Core is a set of changes, APIs, and scripts used for customizing Chromium to make the Brave browser. Please also check https://github.com/brave/brave-browser

Follow @brave on Twitter for important announcements.

Resources

Community

You can ask questions and interact with the community in the following locations:

S
Description
No description provided
Readme MPL-2.0
3.8 GiB
Languages
C++ 36.9%
HTML 31.6%
Swift 9.4%
TypeScript 9%
Java 4.8%
Other 8.1%