Closed Bug 775822 Opened 12 years ago Closed 12 years ago

B2G shell.js and CameraContent.js should use the new permission manager api

Categories

(Firefox OS Graveyard :: General, defect)

defect
Not set
normal

Tracking

(blocking-basecamp:+)

RESOLVED FIXED
blocking-basecamp +

People

(Reporter: mounir, Assigned: mounir)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

Attached patch Patch (obsolete) (deleted) — Splinter Review
In my opinion, this code is completely buggy. I make the !testPermission() more explicit so it's clear what the code is doing. Vivien, can you tell me what this code is expected to do.
Attachment #644145 - Flags: review?
Attachment #644145 - Flags: review? → review?(21)
Summary: B2G shell.js should use the new permission manager api → B2G shell.js and CameraContent.js should use the new permission manager api
Attached patch Patch (deleted) — Splinter Review
Attachment #644145 - Attachment is obsolete: true
Attachment #644145 - Flags: review?(21)
Attachment #644146 - Flags: review?(21)
Comment on attachment 644146 [details] [diff] [review] Patch Review of attachment 644146 [details] [diff] [review]: ----------------------------------------------------------------- ::: b2g/chrome/content/shell.js @@ +244,5 @@ > let manifest = documentElement.getAttribute('manifest'); > if (!manifest) > return; > > + if (!Services.perms.testPermissionFromPrincipal(contentWindow.document.nodePrincipal, 'offline-app') != Ci.nsIPermissionManager.UNKNOWN_ACTION) { I think there is an extra ! somewhere :) Also can you |let principal = contentWindow.document.nodePrincipal;| and use that to kill this extra long line.
Attachment #644146 - Flags: review?(21)
Comment on attachment 644146 [details] [diff] [review] Patch Review of attachment 644146 [details] [diff] [review]: ----------------------------------------------------------------- Don't forget to fix the ! before landing.
Attachment #644146 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: