Closed
Bug 273971
Opened 20 years ago
Closed 19 years ago
nsIDownload should use bytes rather than kbytes
Categories
(SeaMonkey :: Download & File Handling, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: zbraniecki, Assigned: son.le0)
References
()
Details
Attachments
(1 file, 3 obsolete files)
12.72 KB,
patch
|
Biesinger
:
review+
son.le0
:
superreview+
|
Details | Diff | Splinter Review |
At the moment nsIDownload after fixing bug 239006 will be using kbytes. Biesi wants to have it in bytes.
Changes pretty much localized to just nsDownloadManager. The only place I could see that used amountTransferred and size was in downloads.js, but only as a ratio so no changes was necessary.
Attachment #201620 -
Flags: superreview?(darin)
Attachment #201620 -
Flags: review?(cbiesinger)
Comment 2•19 years ago
|
||
(In reply to comment #1) >Changes pretty much localized to just nsDownloadManager. What about the original nsDownloadManager? :-P
umm.. yes, and the original nsDownloadManager, too, even though it's not actually used.
Attachment #201620 -
Attachment is obsolete: true
Attachment #201629 -
Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #201629 -
Flags: review?(cbiesinger)
Attachment #201620 -
Flags: superreview?(darin)
Attachment #201620 -
Flags: review?(cbiesinger)
Comment 4•19 years ago
|
||
eh, that download manager is very much used.
yes, I meant to say that the variables amountTransferred/size (mCurrBytes/mMaxBytes) are not used by xpfe.
Comment 6•19 years ago
|
||
Comment on attachment 201629 [details] [diff] [review] proposed patch w/ xpfe changes xpfe does use it: http://lxr.mozilla.org/seamonkey/source/xpfe/components/download-manager/src/nsDownloadManager.cpp#396 so does toolkit actually: http://lxr.mozilla.org/seamonkey/source/toolkit/components/downloads/src/nsDownloadManager.cpp#464 you need to change those two, don't you?
Comment 7•19 years ago
|
||
Comment on attachment 201629 [details] [diff] [review] proposed patch w/ xpfe changes This change will make the download manager display bytes (although still using the KB of KB string!). Is it outside the scope of this bug to make it display scientifically i.e. K/M/GB as appropriate? Also is it outside the scope of this bug to set mMaxBytes to mCurrBytes at the end of an unknown amount of tranfer?
Attachment #201629 -
Flags: superreview?(neil.parkwaycc.co.uk) → superreview-
Updated•19 years ago
|
Attachment #201629 -
Flags: review?(cbiesinger) → review-
Hmmm... changed both references as per biesi's comment, although firefox works regardless. > This change will make the download manager display bytes (although still using > the KB of KB string!). Yep, noticed this after building seamonkey. Seems xpfe uses the above code, but toolkit doesn't. > Is it outside the scope of this bug to make it display scientifically > i.e. K/M/GB as appropriate? Hmmm.. I'm be happy to do this is a separate bug, although there is existing toolkit code that does at least K/MB. > Also is it outside the scope of this bug to set mMaxBytes to mCurrBytes at the > end of an unknown amount of tranfer? Done.
Attachment #201629 -
Attachment is obsolete: true
Attachment #202490 -
Flags: superreview?
Attachment #202490 -
Flags: review?(cbiesinger)
Comment on attachment 202490 [details] [diff] [review] patch v1 updated superreview request to use neil's new email address.
Attachment #202490 -
Flags: superreview? → superreview?(neil.parkwaycc.co.uk)
Updated•19 years ago
|
Attachment #202490 -
Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Comment 10•19 years ago
|
||
Comment on attachment 202490 [details] [diff] [review] patch v1 - TransferInformation GetTransferInformation() { + void GetTransferInformation(PRInt64* aCurr, PRInt64* aMax) { _why_?
Comment 11•19 years ago
|
||
Comment on attachment 202490 [details] [diff] [review] patch v1 + // update progress - for some reason in the last progress change + // for transfers of unknown size, aCurTotalProgress = -1. is that a question? if so, the answer is: http://lxr.mozilla.org/seamonkey/source/uriloader/exthandler/nsExternalHelperAppService.cpp#2067 I kinda think that this should be fixed in exthandler instead, and I actually believe that I once reviewed a patch that does that, no idea what happened to it... anyway, this comment is stupid. remove the "for some reason" part. the reason is clear, and a bug (imo).
Assignee | ||
Comment 12•19 years ago
|
||
(In reply to comment #10) > (From update of attachment 202490 [details] [diff] [review] [edit]) > - TransferInformation GetTransferInformation() { > + void GetTransferInformation(PRInt64* aCurr, PRInt64* aMax) { > > _why_? > To make xpfe code the same as toolkit. Couldn't see any value in making it pass a struct instead of variables and it wasn't being used anywhere else. > I kinda think that this should be fixed in exthandler instead, and I actually > believe that I once reviewed a patch that does that, no idea what happened to > it... that would be bug 149237. > anyway, this comment is stupid. remove the "for some reason" part. the reason > is clear, and a bug (imo). I put the comment there as I didn't understand why xpfe did this while toolkit didn't. I agree it's a bug and will attach a new patch.
Comment 13•19 years ago
|
||
I explicitly changed the xpfe code to use that style (per a sr comment), and my patch to port that and a lot of other stuff to toolkit did never get review... the reason is to group variables together that belong together.
Assignee | ||
Comment 14•19 years ago
|
||
hmmm... should I change toolkit code instead or just leave as it?
Comment 15•19 years ago
|
||
whatever you prefer.
Assignee | ||
Comment 16•19 years ago
|
||
Fixed last progress change for transfers of unknown size and changed toolkit to use TransferInformation struct (making it the same as xpfe code). carrying forward sr+
Attachment #202490 -
Attachment is obsolete: true
Attachment #204110 -
Flags: superreview+
Attachment #204110 -
Flags: review?(cbiesinger)
Attachment #202490 -
Flags: review?(cbiesinger)
Comment 17•19 years ago
|
||
Comment on attachment 204110 [details] [diff] [review] patch v2 r=biesi, sorry for the delay
Attachment #204110 -
Flags: review?(cbiesinger) → review+
Updated•19 years ago
|
Assignee: gandalf → son.le0
Comment 18•19 years ago
|
||
fixed on trunk Checking in toolkit/components/downloads/src/nsDownloadManager.cpp; /cvsroot/mozilla/toolkit/components/downloads/src/nsDownloadManager.cpp,v <-- nsDownloadManager.cpp new revision: 1.56; previous revision: 1.55 done Checking in toolkit/components/downloads/src/nsDownloadManager.h; /cvsroot/mozilla/toolkit/components/downloads/src/nsDownloadManager.h,v <-- nsDownloadManager.h new revision: 1.19; previous revision: 1.18 done Checking in uriloader/base/nsIDownload.idl; /cvsroot/mozilla/uriloader/base/nsIDownload.idl,v <-- nsIDownload.idl new revision: 1.16; previous revision: 1.15 done Checking in uriloader/exthandler/nsExternalHelperAppService.cpp; /cvsroot/mozilla/uriloader/exthandler/nsExternalHelperAppService.cpp,v <-- nsExternalHelperAppService.cpp new revision: 1.295; previous revision: 1.294 done Checking in xpfe/components/download-manager/src/nsDownloadManager.cpp; /cvsroot/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp,v <-- nsDownloadManager.cpp new revision: 1.113; previous revision: 1.112 done Checking in xpfe/components/download-manager/src/nsDownloadManager.h; /cvsroot/mozilla/xpfe/components/download-manager/src/nsDownloadManager.h,v <-- nsDownloadManager.h new revision: 1.43; previous revision: 1.42 done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•