Closed Bug 1054036 Opened 11 years ago Closed 4 years ago

Block downloads in GuestMode inside HelperAppDialog.js

Categories

(Firefox for Android Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: wesj, Unassigned)

References

Details

I blocked downloads in Guest mode originally in downloads.js. Richard pointed out it might be more resilient to do it in HelperAppDialog.js.
I wish we had a better way of handling this kind of code. Putting | if (isGuestMode()) | checks throughout the code seems brittle and too reminiscent of private browsing. I don't know that a better pattern exists for our situation though. I also feel like we'll be doing the same kind of checks for restricted Android profiles too.
I was thinking the same. There's nothing stopping us from running this stuff through the permission manager. Maybe I'll play with that.
Blocks: 1058149
Blocks: 1065752
The HelperAppDialog isn't actually hit for all downloads. For instance, "Save Image...". We can put a check in there, but I don't think it really gains us much at that point. Also, we re-used a string for errors from the one used in ContentDispatchChooser.js so the toast says "Couldn't find an app for this protocol". I'll file a separate bug for that.
We have completed our launch of our new Firefox on Android. The development of the new versions use GitHub for issue tracking. If the bug report still reproduces in a current version of [Firefox on Android nightly](https://play.google.com/store/apps/details?id=org.mozilla.fenix) an issue can be reported at the [Fenix GitHub project](https://github.com/mozilla-mobile/fenix/). If you want to discuss your report please use [Mozilla's chat](https://wiki.mozilla.org/Matrix#Connect_to_Matrix) server https://chat.mozilla.org and join the [#fenix](https://chat.mozilla.org/#/room/#fenix:mozilla.org) channel.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INCOMPLETE
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.