On 06/18/2012 03:00 PM, Anant Narayanan wrote:

- getInstalled retains its current behaviour when called from an origin
that is not privileged (e.g. an app store).

- getInstalled, when called from a privileged origin, will return a list
of "natively" installed apps, where the natively-installed-or-not bit is
determined by the WebRT which takes into context the operating system
and other pertinent information. (In B2G, getAll and getInstalled will
always return the same set of apps, for instance).

getAll() and getInstalled() will *not* always return the same set of apps, even in b2g. Store A will only see apps from store A using getInstalled(), and Store B only apps from Store B, while getAll() will list apps from Store A and Store B.

- getAll retains its current behaviour of returning all apps in the
local registry and can only be accessed from a privileged domain.

As for re-purposing getInstalled to act differently when called from a
privileged domain, we should consider that every other API call in the
mozApps namespace with the exception of install is context-sensitive;
and the results vary based on who the caller is. This is therefore not a
departure from the rest of the API as currently defined.

You're making an equivalence of "changing the result of a call because the caller is privileged" (which is only true of mgmt.*) with "changing the result depending of the caller URI" (true for getInstalled() and getSelf()), but that are two different things.

Please send any major objections to the list. If there are none, I
propose we move ahead with bug 749033 ASAP.

I still don't see why we should do that. With your proposal, a Store needs to ask to be privileged to see the "correct" list of apps, but the call will not fail otherwise. So if the user doesn't grant the permission, it will end up with a potentially incorrect response?

Why would an app be in the DOM Registry while not natively installed? If the reason is an implementation issue (like detecting native uninstall), we should try to fix these issues first.

        Fabrice
--
Fabrice Desré
b2g Team
Mozilla Corporation


_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to