Last Comment Bug 709875 - add enumerateAll to navigator.mozApps API
: add enumerateAll to navigator.mozApps API
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Other Branch
: All All
: -- normal (vote)
: mozilla11
Assigned To: [:fabrice] Fabrice Desré
:
Mentors:
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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
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 [: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 [:fabrice] Fabrice Desré 2011-12-12 11:46:39 PST
Created attachment 580990 [details] [diff] [review]
patch

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 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 [: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 addons.mozilla.org for instance.
Comment 4 [:fabrice] Fabrice Desré 2011-12-14 10:25:30 PST
Created attachment 581704 [details] [diff] [review]
whitelist patch

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

track errors -> report errors
Comment 6 [:fabrice] Fabrice Desré 2011-12-15 09:22:02 PST
pushed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/abdc706d75d1
Comment 7 Ed Morley [:emorley] 2011-12-16 06:13:24 PST
https://hg.mozilla.org/mozilla-central/rev/abdc706d75d1

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