Closed Bug 709875 Opened 9 years ago Closed 9 years ago

add enumerateAll to navigator.mozApps API

Categories

(Core :: DOM: Core & HTML, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: fabrice, Assigned: fabrice)

References

Details

Attachments

(2 files)

The current API only has an |enumerate()| call that sends different results based on calling context. This can be confusing, so we split it into two parts :

- non privileged callers can use enumerate() to get themselves (apps) or apps installed from their origin (stores)

- privileged callers (eg. dashboards) can use enumerateAll() to get the full list of installed apps.
Attached patch patchSplinter Review
Exposes enumerateAll(), which was already used internally for the privileged case.
Also add documentation in the IDL and fixes a bug in enumerate()
Attachment #580990 - Flags: review?(gal)
Fabrice, I think we should request privilege if the app does enumerateAll(). That way even if the app is not installed we can pick up the privilege (the dashboard thing the webapps guys are doing will want this I think).
My plan for the "official dashboard" issue was to use a whitelist pref initially, until we get UX sorted on what they want. This is what the add-on manager is doing to whitelist installs from addons.mozilla.org for instance.
Attached patch whitelist patchSplinter Review
Adding whitelist support.
Comment on attachment 580990 [details] [diff] [review]
patch

track errors -> report errors
Attachment #580990 - Flags: review?(gal) → review+
Blocks: 711138
https://hg.mozilla.org/mozilla-central/rev/abdc706d75d1
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.