Closed Bug 414161 Opened 17 years ago Closed 17 years ago

Quit & cancelation confirmation should not be displayed if downloads are resumable

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.9beta3

People

(Reporter: sdwilsh, Assigned: sdwilsh)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Flags: blocking-firefox3?
Attached patch v1.0 (obsolete) — Splinter Review
The previously mentioned bug can handle string changes if need be.
Attachment #299466 - Flags: review?(edilee)
Flags: in-testsuite-
Flags: in-litmus?
Whiteboard: [has patch][needs review Mardak]
hmm looks similar to Bug 402436 ;)
Comment on attachment 299466 [details] [diff] [review] v1.0 >- // Count active downloads that aren't real-paused >+ // Count active downloads Just get rid of this comment > PRInt32 currDownloadCount = mCurrentDownloads.Count(); nit: add a new line here >+ // but not downloads that are paused, nor downloads that are resumable, since >+ // we can cancel those and resume them without a problem with the right >+ // preference set. Change the comment to something more like.. "If we don't need to cancel all the downloads on quit, only count the ones that aren't resumable" >+ if (GetQuitBehavior() != QUIT_AND_CANCEL) { >+ for (PRInt32 i = mCurrentDownloads.Count() - 1; i >= 0; --i) { Reuse currDownloadCount (minus one) that we already have for initializing "i" >+ nsDownload *dl = mCurrentDownloads[i]; >+ if (dl->IsPaused() || dl->IsResumable()) >+ currDownloadCount--; No need to check IsPaused because it can only be paused if it's resumable. So no need to declare the temporary dl pointer.
Attachment #299466 - Flags: review?(edilee) → review-
Attached patch v1.1Splinter Review
Addresses review comments.
Attachment #299466 - Attachment is obsolete: true
Attachment #299859 - Flags: review?(edilee)
Comment on attachment 299859 [details] [diff] [review] v1.1 r=Mardak
Attachment #299859 - Flags: review?(edilee) → review+
Whiteboard: [has patch][needs review Mardak] → [has patch][has review][needs approval]
Attachment #299859 - Flags: approval1.9?
Comment on attachment 299859 [details] [diff] [review] v1.1 a1.9+=damons
Attachment #299859 - Flags: approval1.9? → approval1.9+
Checking in toolkit/components/downloads/src/nsDownloadManager.cpp; new revision: 1.158; previous revision: 1.157
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review][needs approval]
Verified with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b3pre) Gecko/2008013004 Minefield/3.0b3pre ID:2008013004
Status: RESOLVED → VERIFIED
Flags: blocking-firefox3? → blocking-firefox3+
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: