Skip to content
Commit 9a87fd4a authored by Martin Šrámek's avatar Martin Šrámek Committed by Chromium LUCI CQ
Browse files

Fix the restarting of data counters in the transactional CBD

After the Clear Browsing Data dialog was updated to be transactional,
i.e. to only update the preferences backing up the datatype and time
range choices when the user confirms the deletion (crbug.com/40941621),
the browsing data counters broke.

The counters were set to automatically restart counting whenever
either of the aforementioned preferences changed, and thus now aren't
restarted at all.

This CL adds an explicit call from the dropdown change event in the UI
to BrowsingDataCounter::Restart(). To support this functionality,
counters have gotten a new mode where they're still tied to a datatype
preference (which is necessary to match the counter with the
corresponding checkbox) but no longer depend on a time range
preference, which is provided directly from the UI.

Bug: 331925113
Change-Id: Ib2d31786e0c8921a089bd03ab9c2f517f6c65f19
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5425556


Reviewed-by: default avatarTheodore Olsauskas-Warren <sauski@google.com>
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Reviewed-by: default avatarRainhard Findling <rainhard@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1289250}
parent 7a81bda1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment