On 6/18/12 3:22 PM, Fabrice Desré wrote:
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.

I meant in the privileged case, getAll and getInstalled will return the same set in B2G's case.

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.

How is a caller being privileged any different from a call being different based on an origin? Privilege is granted to a particular origin, after all. I don't agree that they are different things.

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?

A store always gets the list of installed apps, whether or not they are privileged - I don't think that incorrect. A store already knows whether or not you've "acquired" the app. So what's the incorrect response here?

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.

That depends on what your interpretation of the DOM registry is. My view is that it is a list of all the apps the user has acquired. The set of apps natively installed may be different (but always a subset) of that list.

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

Reply via email to