Closed
Bug 931777
Opened 11 years ago
Closed 11 years ago
Use Downloads.jsm functions to get download directories in Firefox for Metro
Categories
(Firefox for Metro Graveyard :: Downloads, defect)
Firefox for Metro Graveyard
Downloads
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 28
People
(Reporter: Paolo, Assigned: marcos)
References
Details
Attachments
(1 file, 4 obsolete files)
9.53 KB,
patch
|
emtwo
:
review+
|
Details | Diff | Splinter Review |
In bug 875731, we updated several code paths in Toolkit to use the new JavaScript API to get the download directories. The final directory is the same, but obtained using a different code path. To keep consistency, we should update the remaining code paths to use the new JavaScript API, as prototyped in the attached patch (that should however use promptForSaveToFileAsync).
Comment 1•11 years ago
|
||
marina would be a good reviewer for this, she's worked on most of our download code. cc'ing bbondy as well since he implemented the file picker in metro.
Updated•11 years ago
|
Assignee: nobody → marcos
Comment 2•11 years ago
|
||
Attachment #823328 -
Attachment is obsolete: true
Comment 3•11 years ago
|
||
Implemented the promptForSaveToFileAsync() but since I haven't setup metro environment for testing. Please kindly help to test this patch.
Attachment #823765 -
Flags: feedback?(netzen)
Updated•11 years ago
|
Attachment #823765 -
Attachment description: bug-931777.diff → v1
Comment 4•11 years ago
|
||
Comment on attachment 823765 [details] [diff] [review] v1 Marina would you mind reviewing this, I'd like to move to the 2 reviews for you in the meantime.
Attachment #823765 -
Flags: feedback?(netzen) → review?(msamuel)
Reporter | ||
Comment 5•11 years ago
|
||
(In reply to Brian R. Bondy [:bbondy] from comment #4) > Marina would you mind reviewing this, I'd like to move to the 2 reviews for > you in the meantime. This needs some simple local testing as well, since we don't have a Metro environment.
Comment 6•11 years ago
|
||
Comment on attachment 823765 [details] [diff] [review] v1 Review of attachment 823765 [details] [diff] [review]: ----------------------------------------------------------------- ::: browser/metro/components/HelperAppDialog.js @@ +216,2 @@ > > + if (picker.show() == Ci.nsIFilePicker.returnCancel) { It looks like this code was already broken, but we need to update this to the non-deprecated open() call insstead. show won't work in Metro because it is sync and metro only support an async filepicker.
Attachment #823765 -
Flags: review?(msamuel)
Comment 7•11 years ago
|
||
(In reply to Brian R. Bondy [:bbondy] from comment #6) > Comment on attachment 823765 [details] [diff] [review] > v1 > > Review of attachment 823765 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: browser/metro/components/HelperAppDialog.js > @@ +216,2 @@ > > > > + if (picker.show() == Ci.nsIFilePicker.returnCancel) { > > It looks like this code was already broken, but we need to update this to > the non-deprecated open() call insstead. show won't work in Metro because it > is sync and metro only support an async filepicker. Switched to use open.
Attachment #823762 -
Attachment is obsolete: true
Attachment #823765 -
Attachment is obsolete: true
Attachment #825610 -
Flags: review?(msamuel)
Comment 8•11 years ago
|
||
Comment on attachment 825610 [details] [diff] [review] v2 Review of attachment 825610 [details] [diff] [review]: ----------------------------------------------------------------- Other than the one comment, looks good overall. Downloads are working as expected and passed mochitest locally. It's cool toggling the filepicker as a pref too! sfoster, did you still want to give this another look? ::: browser/metro/components/HelperAppDialog.js @@ +240,5 @@ > + file = this.validateLeafName(newDir, file.leafName, null); > + } > + aLauncher.saveDestinationAvailable(file); > + }.bind(this)); > + }); Please add .bind(this) at the end of this function too.
Attachment #825610 -
Flags: review?(sfoster)
Attachment #825610 -
Flags: review?(msamuel)
Attachment #825610 -
Flags: feedback+
Comment 9•11 years ago
|
||
Comment on attachment 825610 [details] [diff] [review] v2 Nothing further to add to Mariana's catch of the extra bind() needed. Thanks for doing this, it looks good and works well.
Attachment #825610 -
Flags: review?(sfoster) → feedback+
Comment 10•11 years ago
|
||
(In reply to Marina Samuel [:emtwo] from comment #8) > Comment on attachment 825610 [details] [diff] [review] > v2 > > Review of attachment 825610 [details] [diff] [review]: > ----------------------------------------------------------------- > > Other than the one comment, looks good overall. Downloads are working as > expected and passed mochitest locally. It's cool toggling the filepicker as > a pref too! sfoster, did you still want to give this another look? > > ::: browser/metro/components/HelperAppDialog.js > @@ +240,5 @@ > > + file = this.validateLeafName(newDir, file.leafName, null); > > + } > > + aLauncher.saveDestinationAvailable(file); > > + }.bind(this)); > > + }); > > Please add .bind(this) at the end of this function too. Have added that. Pushed to try and waiting for results https://tbpl.mozilla.org/?tree=Try&rev=e60c84f2a09b
Attachment #826011 -
Flags: review?(msamuel)
Updated•11 years ago
|
Attachment #825610 -
Attachment is obsolete: true
Comment 11•11 years ago
|
||
Comment on attachment 826011 [details] [diff] [review] v3 Review of attachment 826011 [details] [diff] [review]: ----------------------------------------------------------------- r+ with the try build working.
Attachment #826011 -
Flags: review?(msamuel) → review+
Updated•11 years ago
|
Keywords: checkin-needed
Comment 12•11 years ago
|
||
On fx-team: https://hg.mozilla.org/integration/fx-team/rev/ba892a5d8085
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ba892a5d8085
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 28
You need to log in
before you can comment on or make changes to this bug.
Description
•