Closed Bug 1134553 Opened 10 years ago Closed 10 years ago

Downloads are not disabled in guest mode

Categories

(Firefox for Android Graveyard :: General, defect)

38 Branch
ARM
Android
defect
Not set
normal

Tracking

(firefox35 unaffected, firefox36 unaffected, firefox37 verified, firefox38 verified, firefox39 verified, fennec37+)

VERIFIED FIXED
Firefox 39
Tracking Status
firefox35 --- unaffected
firefox36 --- unaffected
firefox37 --- verified
firefox38 --- verified
firefox39 --- verified
fennec 37+ ---

People

(Reporter: TeoVermesan, Assigned: Margaret)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Tested with:
Device: Nexus 5 (Android 5.0.1), Nexus 4 (Android 4.4)

Steps to reproduce:
1. Open Firefox and enter guest mode
2. Go to Menu -> Page -> Save as PDF

Expected results:
- "Downloads are disabled  in guest sessions" notification is displayed

Actual results:
- "Download started..." notification is displayed

Note:
- regression: - Bug 901360 - Convert to Downloads.jsm
good build: 2014-12-16
bad build: 2014-12-17
pushlog: http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b836016d82b5&tochange=b7eb1ce0237d
It seems that the patches from Bug 1046941 were lost in the transition to download.jsm
Depends on: 1046941
tracking-fennec: --- → ?
Keywords: regression
We do this a little differently now, but we probably need to do something like (guessing at functions a bit):

if (!ParentalControls.isAllowed(ParentalControls.DOWNLOAD_FILES, download.source)) {
  download.cancel().catch(Cu.reportError);
  download.removePartialData().catch(Cu.reportError);
  NativeWindow.toast.show(Strings.browser.GetStringFromName("downloads.disabledInGuest"), "long");
  return;
}

around here:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/modules/DownloadNotifications.jsm#53
I think we should WONTFIX this bug, since downloads in guest mode are actually useful for things like PDF menus. wesj pointed out in triage that preventing excessive downloads was more of a concern when we had the lock screen widget, but now we don't have that, so we don't need to be worried.

However, if we do re-enable downloads in guest mode, we should file another bug to make sure that we delete these downloads after the user exits guest mode.
tracking-fennec: ? → 37+
Filed bug 1137380 for the clean up.
Assignee: nobody → margaret.leibovic
Blocks: 1137380
/r/5257 - Bug 1134553 - Disable downloads in guest session. r=rnewman

Pull down this commit:

hg pull review -r 0f6d351e9366329046d5096fe7fcad4b800779b3
Attachment #8576796 - Flags: review?(rnewman)
I'll look at this shortly.
Status: NEW → ASSIGNED
Comment on attachment 8576796 [details]
MozReview Request: bz://1134553/margaret

https://reviewboard.mozilla.org/r/5255/#review4273

The code seems fine, but earlier in the bug you suggested WONTFIXing. Do you plan to back this out after we solve cleanup, or what? Can we get a summary in the bug of what we think is supposed to happen here?
Attachment #8576796 - Flags: review?(rnewman) → review+
(In reply to Richard Newman [:rnewman] from comment #7)

> The code seems fine, but earlier in the bug you suggested WONTFIXing. Do you
> plan to back this out after we solve cleanup, or what? Can we get a summary
> in the bug of what we think is supposed to happen here?

I was going to WONTFIX this because I thought that this was actually a useful regression (a feature, not a bug!), but after more consideration, there were enough other issues that we would need to do more work to properly support downloads in a guest session. Bug 1137380 was filed about this.
https://hg.mozilla.org/integration/fx-team/rev/87d2b8e83c5b
Keywords: verifyme
Blocks: 901360
Comment on attachment 8576796 [details]
MozReview Request: bz://1134553/margaret

Approval Request Comment
[Feature/regressing bug #]: bug 901360
[User impact if declined]: downloads won't work properly in guest mode, but they will appear to be enabled
[Describe test coverage new/current, TreeHerder]: tested locally, just landed on fx-team
[Risks and why]: low-risk, restores logic that was dropped in patches for bug 901360
[String/UUID change made/needed]: none
Attachment #8576796 - Flags: approval-mozilla-beta?
Attachment #8576796 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/87d2b8e83c5b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
Attachment #8576796 - Flags: approval-mozilla-beta?
Attachment #8576796 - Flags: approval-mozilla-beta+
Attachment #8576796 - Flags: approval-mozilla-aurora?
Attachment #8576796 - Flags: approval-mozilla-aurora+
Verified as fixed in builds:
- 39.0a1 2015-03-17;
- 38.0a2 2015-03-17;
- 37 beta 6;
Device: Lenovo Yoga Tab 10 (Android 4.4.2).
Attachment #8576796 - Attachment is obsolete: true
Attachment #8619538 - Flags: review+
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: