Add Services.perms.getAllByTypes(permissionTypes)
Categories
(Core :: Permission Manager, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
Details
Attachments
(1 file)
In Bug 1778959, we need to be able to retrieve all the nsIPermissions
for given permission types.
Using getAllWithTypePrefix
on the different types doesn't seem efficient, and look a bit brittle (for example, the prefs we need to retrieve are midi
and midi-sysex
, which share the same prefix and would complexify the implementation)
Having a getAllByTypes
function, taking an array of the permission types would help to have a cleaner implementation for Bug 1778959 (e.g. permissions = Services.perms.getAllWithTypes(["midi", "midi-sysex"])
).
Assignee | ||
Comment 1•2 years ago
|
||
I have a patch that seems to work as expected, I'll push it for review
Assignee | ||
Comment 2•2 years ago
|
||
This new method return an array of nsIPermission
whose type are included in the
array of permission types parameter.
This will help the implementation of Bug 1778959 where we need to get all the permission
of a given Set of (gated) permission types.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4cd93530c1c9 Add Services.perms.getAllByTypes(permissionTypes). r=permissions-reviewers,necko-reviewers,pbz
Comment 4•2 years ago
|
||
bugherder |
Description
•