Rename storageAccessAPI permission
Categories
(Core :: Privacy: Anti-Tracking, enhancement, P3)
Tracking
()
People
(Reporter: bvandersloot, Unassigned)
References
(Blocks 1 open bug)
Details
This permission is not what is granted by the Storage Access API and actually indicates a page that the user has interacted with in the past ~month. This name is only a source of confusion. I propose antitrackingRecentInteraction, or something similar to capture that it is to be used for AT purposes and describe what the permission means.
Some measurements, because the cost here is not where the title suggests.
storageAccessAPI appears 237 times across 65 files, but only 10 of those are non-test files. So the code change itself is modest; the bulk is test fixtures.
The real cost is that this is a persisted permission type, so existing profiles carry it in the permissions database. Renaming needs a migration, and there is at least one place where the old name is baked into SQL — PermissionManager.cpp#1487:
"SUBSTR(type, 0, 18) == \"storageAccessAPI^\";"
Note the 18. "storageAccessAPI^" is 17 characters, so the prefix length is hardcoded into the query alongside the string. A rename has to update both, and any new name of a different length changes that constant — an easy thing to miss and not something the compiler will catch.
None of that argues against doing it; the naming complaint in comment 0 is fair, since the permission records recent interaction rather than anything the Storage Access API granted. It just means this is a migration bug rather than a rename bug, and should probably be scheduled as such.
Description
•