Closed Bug 1184404 Opened 9 years ago Closed 9 years ago

support additional navigator.getFeature keys for OpenMobile ACL

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed
b2g-v2.0 --- fixed
b2g-v2.0M --- fixed
b2g-v2.1 --- fixed
b2g-v2.1S --- fixed
b2g-v2.2 --- fixed
b2g-v2.2r --- fixed
b2g-master --- fixed

People

(Reporter: bwalker, Assigned: wchen)

References

Details

Attachments

(1 file)

This bug is to track the extension of the existing getFeature support for OpenMobile ACL. The proposal here is to allow apps with the "external-app" permission to call on any property matching getFeature("acl.*") and have the implementation retrieve the corresponding values from the android property_get.
Which getFeature is this about?
navigator.getFeature()
Summary: support additional getFeature values for OpenMobile ACL → support additional navigator.getFeature keys for OpenMobile ACL
What's wrong with <extapp>.getCustomFeature("feature-foo")?
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #3)
> What's wrong with <extapp>.getCustomFeature("feature-foo")?

Hamzata, would you be OK with calling getCustomFeature() from within your JS code to access these other values?
Flags: needinfo?(hdiallo)
(In reply to Bill Walker [:bwalker] [@wfwalker] from comment #4)
> (In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #3)
> > What's wrong with <extapp>.getCustomFeature("feature-foo")?
> 
> Hamzata, would you be OK with calling getCustomFeature() from within your JS
> code to access these other values?

Bill, that is fine. The idea was to minimize the changes by leveraging the implementation of getFeature() we already have. But please remember that we can't use the plugin because ACL will might not be installed by the time we make this call.
Flags: needinfo?(hdiallo)
(In reply to William Chen [:wchen] from comment #6)
> Created attachment 8634580 [details] [diff] [review]
> Support additional navigator.getFeature keys for OpenMobile ACL

Awesome! One question -- this would require Firefox Marketplace to list "external-app" in its privileges when it calls getFeature("acl.version"), right?
No, in the patch I uploaded, acl.version is a special case and doesn't require the "external-app" permission.
(In reply to William Chen [:wchen] from comment #8)
> No, in the patch I uploaded, acl.version is a special case and doesn't
> require the "external-app" permission.

I see it now. I misread the patch. Triple awesome.
Hamzata,

William already created the patch for the issue we discussed yesterday. Could you test it and inform us that it works. So that, once we get your ok, we can land it in the 2.1s and 2.0m branches. 

thanks,
didem
Flags: needinfo?(hdiallo)
Comment on attachment 8634580 [details] [diff] [review]
Support additional navigator.getFeature keys for OpenMobile ACL

Review of attachment 8634580 [details] [diff] [review]:
-----------------------------------------------------------------

Not using the thing that we custom built for this exact use case is dumb, but w/e.
Attachment #8634580 - Flags: review?(khuey) → review+
Assignee: nobody → wchen
Comment on attachment 8634580 [details] [diff] [review]
Support additional navigator.getFeature keys for OpenMobile ACL

NOTE: Please see https://wiki.mozilla.org/Release_Management/B2G_Landing to better understand the B2G approval process and landings.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): Bug 1169474
User impact if declined: It may be harder to ship ACL without the changes.
Testing completed: Manually tested on device.
Risk to taking this patch (and alternatives if risky): Low risk, changes are small and only compiles in Gonk. Affects apps with "external-app" permission which is only available to OpenMobile apps.
String or UUID changes made by this patch: None
Attachment #8634580 - Flags: approval-mozilla-b2g37?
Attachment #8634580 - Flags: approval-mozilla-b2g34?
Attachment #8634580 - Flags: approval-mozilla-b2g32?
Comment on attachment 8634580 [details] [diff] [review]
Support additional navigator.getFeature keys for OpenMobile ACL

Approving since Fabrice is out.
Attachment #8634580 - Flags: approval-mozilla-b2g37?
Attachment #8634580 - Flags: approval-mozilla-b2g37+
Attachment #8634580 - Flags: approval-mozilla-b2g34?
Attachment #8634580 - Flags: approval-mozilla-b2g34+
Attachment #8634580 - Flags: approval-mozilla-b2g32?
Attachment #8634580 - Flags: approval-mozilla-b2g32+
Adding Josh and Mahe so they are aware of the approvals.
https://hg.mozilla.org/mozilla-central/rev/1bcf82e1e10a
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
(In reply to Didem Ersoz [:didem] from comment #10)
> Hamzata,
> 
> William already created the patch for the issue we discussed yesterday.
> Could you test it and inform us that it works. So that, once we get your ok,
> we can land it in the 2.1s and 2.0m branches. 
> 
> thanks,
> didem

For clearing the needinfo flag...
Flags: needinfo?(hdiallo)
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: