Closed
Bug 1247791
Opened 9 years ago
Closed 8 years ago
Implement options.saveAs for chrome.downloads.download()
Categories
(WebExtensions :: General, defect, P2)
WebExtensions
General
Tracking
(firefox52 fixed)
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: aswan, Assigned: zombie)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: dev-doc-complete, Whiteboard: [downloads] triaged)
Attachments
(1 file)
Updated•9 years ago
|
Priority: -- → P2
Whiteboard: [downloads] → [downloads] triaged
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → tomica
Status: NEW → ASSIGNED
Component: WebExtensions: Untriaged → WebExtensions: General
Comment hidden (mozreview-request) |
Assignee | ||
Comment 2•8 years ago
|
||
mozreview-review |
Comment on attachment 8792654 [details]
Bug 1247791 - Implement options.saveAs for downloads.download,
https://reviewboard.mozilla.org/r/79572/#review78236
::: toolkit/components/extensions/ext-downloads.js:462
(Diff revision 1)
> + return Promise.resolve(target);
> + }
> +
> + // Setup the file picker Save As dialog.
> + const picker = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
> + picker.init(global.WindowManager.topWindow, null, picker.modeSave);
eslint complains without the global
Comment hidden (mozreview-request) |
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8792654 [details]
Bug 1247791 - Implement options.saveAs for downloads.download,
https://reviewboard.mozilla.org/r/79572/#review80122
::: toolkit/components/extensions/ext-downloads.js:472
(Diff revision 2)
> +
> + // Open the dialog and resolve/reject with the result.
> + return new Promise((resolve, reject) => {
> + picker.open(result => {
> + if (result === Ci.nsIFilePicker.returnCancel) {
> + reject({message: "download canceled by the user"});
Please capitalize.
Attachment #8792654 -
Flags: review?(kmaglione+bmo) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 7•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8792654 [details]
Bug 1247791 - Implement options.saveAs for downloads.download,
https://reviewboard.mozilla.org/r/79572/#review80122
> Please capitalize.
I was going by the format of reject messages a few lines above:
http://searchfox.org/mozilla-central/source/toolkit/components/extensions/ext-downloads.js#408
Assignee | ||
Comment 8•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8792654 [details]
Bug 1247791 - Implement options.saveAs for downloads.download,
https://reviewboard.mozilla.org/r/79572/#review80122
> I was going by the format of reject messages a few lines above:
> http://searchfox.org/mozilla-central/source/toolkit/components/extensions/ext-downloads.js#408
(though now I understand those were property names)
Comment 9•8 years ago
|
||
mozreview-review-reply |
Comment on attachment 8792654 [details]
Bug 1247791 - Implement options.saveAs for downloads.download,
https://reviewboard.mozilla.org/r/79572/#review80122
> (though now I understand those were property names)
Ah. We should probably fix those too...
Assignee | ||
Comment 10•8 years ago
|
||
(In reply to Kris Maglione [:kmag] from comment #9)
> > (though now I understand those were property names)
>
> Ah. We should probably fix those too...
this miss-quoting is a result posting comments at almost the same time. Kris doesn't think we should capitalize property names (from irc).
Keywords: checkin-needed
Comment 11•8 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c017d2d3ffe2
Implement options.saveAs for downloads.download, r=kmag
Keywords: checkin-needed
Comment 12•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Updated•8 years ago
|
Keywords: dev-doc-needed
Comment 13•8 years ago
|
||
Updated compat data:
-> https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/downloads/download#Compatibility_notes
Marking dev-doc-complete, but let me know if I need anything else.
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•