Last Comment Bug 709875 - add enumerateAll to navigator.mozApps API
: add enumerateAll to navigator.mozApps API
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Other Branch
: All All
-- normal (vote)
: mozilla11
Assigned To: [:fabrice] Fabrice Desré
: Andrew Overholt [:overholt]
Depends on:
Blocks: 711138
  Show dependency treegraph
Reported: 2011-12-12 11:03 PST by [:fabrice] Fabrice Desré
Modified: 2011-12-16 06:13 PST (History)
1 user (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (5.63 KB, patch)
2011-12-12 11:46 PST, [:fabrice] Fabrice Desré
gal: review+
Details | Diff | Splinter Review
whitelist patch (807 bytes, patch)
2011-12-14 10:25 PST, [:fabrice] Fabrice Desré
no flags Details | Diff | Splinter Review

Description User image [:fabrice] Fabrice Desré 2011-12-12 11:03:55 PST
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.
Comment 1 User image [:fabrice] Fabrice Desré 2011-12-12 11:46:39 PST
Created attachment 580990 [details] [diff] [review]

Exposes enumerateAll(), which was already used internally for the privileged case.
Also add documentation in the IDL and fixes a bug in enumerate()
Comment 2 User image Andreas Gal :gal 2011-12-12 13:03:06 PST
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).
Comment 3 User image [:fabrice] Fabrice Desré 2011-12-12 13:13:24 PST
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 for instance.
Comment 4 User image [:fabrice] Fabrice Desré 2011-12-14 10:25:30 PST
Created attachment 581704 [details] [diff] [review]
whitelist patch

Adding whitelist support.
Comment 5 User image Andreas Gal :gal 2011-12-15 01:57:30 PST
Comment on attachment 580990 [details] [diff] [review]

track errors -> report errors
Comment 6 User image [:fabrice] Fabrice Desré 2011-12-15 09:22:02 PST
Comment 7 User image Ed Morley [:emorley] 2011-12-16 06:13:24 PST

Note You need to log in before you can comment on or make changes to this bug.