Closed
Bug 218817
Opened 21 years ago
Closed 21 years ago
Split nsIHelperAppLauncher::GetDownloadInfo
Categories
(Core Graveyard :: File Handling, defect)
Core Graveyard
File Handling
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.6alpha
People
(Reporter: Biesinger, Assigned: Biesinger)
Details
Attachments
(1 file, 1 obsolete file)
9.56 KB,
patch
|
bzbarsky
:
review+
darin.moz
:
superreview+
|
Details | Diff | Splinter Review |
120 nsIFile getDownloadInfo(out nsIURI aSourceUrl, out long long
aTimeDownloadStarted);
this is a really ugly function, three things were mixed in here that don't
really belong together.
There is not one caller that requires all three pieces of information - see
http://lxr.mozilla.org/seamonkey/search?string=getdownloadinfo, all callers pass
some "dummy" or "garbage" variables into this function.
Also, |aSourceUrl| is alraedy available on the interface:
94 // the source url
95 readonly attribute nsIURI source;
So this function should be split into two new attributes:
readonly attribute long long timeDownloadStarted;
readonly attribute nsIFile targetFile;
Assignee | ||
Comment 1•21 years ago
|
||
looking at this more closely, I realized that _nobody_ uses the timestamp:
http://lxr.mozilla.org/mozilla/search?string=getdownloadinfo
Assignee | ||
Comment 2•21 years ago
|
||
Assignee | ||
Updated•21 years ago
|
Attachment #132059 -
Flags: review?(bzbarsky)
Assignee | ||
Updated•21 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.6alpha
![]() |
||
Comment 3•21 years ago
|
||
Comment on attachment 132059 [details] [diff] [review]
patch
>Index: embedding/components/ui/helperAppDlg/nsHelperAppDlg.js
> // Need to get temporary file and check for executable-ness.
> var ignore1 = new Object;
> var ignore2 = new Object;
>- var tmpFile = this.mLauncher.getDownloadInfo( ignore1, ignore2 );
>+ var tmpFile = this.mLauncher.targetFile;
We don't need ignore1 and ignore2 anymore.
>Index: uriloader/exthandler/nsIExternalHelperAppService.idl
I would leave a way to get the download start time on this interface for now.
![]() |
||
Comment 4•21 years ago
|
||
Comment on attachment 132059 [details] [diff] [review]
patch
r=me with those changes
Attachment #132059 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 5•21 years ago
|
||
Attachment #132059 -
Attachment is obsolete: true
Assignee | ||
Comment 6•21 years ago
|
||
Comment on attachment 132086 [details] [diff] [review]
patch v2
changes made.
Attachment #132086 -
Flags: superreview?(darin)
Attachment #132086 -
Flags: review?(bzbarsky)
Comment 7•21 years ago
|
||
Comment on attachment 132086 [details] [diff] [review]
patch v2
> if (mFinalFileDestination)
> {
> *aTarget = mFinalFileDestination;
> }
> else
> *aTarget = mTempFile;
nit: fixup brackets to be consistent. either always or never
use brackets when not needed.
>Index: uriloader/exthandler/nsIExternalHelperAppService.idl
>+ /** The file we are saving to */
>+ readonly attribute nsIFile targetFile;
>+ /** Time when the download started */
>+ readonly attribute PRTime timeDownloadStarted;
nit: would be nice to clean up all the comments in this file.
Attachment #132086 -
Flags: superreview?(darin) → superreview+
![]() |
||
Comment 8•21 years ago
|
||
Comment on attachment 132086 [details] [diff] [review]
patch v2
r=bzbarsky
Attachment #132086 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 9•21 years ago
|
||
Checked in; I removed the braces on that if, and changed all comments in that
file to use the
/**
* description
*/
syntax
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•