Allow retrieving DownloadHistoryList objects that show private downloads

RESOLVED FIXED in Firefox 57

Status

()

enhancement
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Paolo, Assigned: mikedeboer)

Tracking

unspecified
mozilla57
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox57 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Reporter

Description

2 years ago
Retrieving a DownloadHistoryList that includes private downloads is required by the front-end view in bug 1354532. I'm moving Mike's existing patch to this bug.
Comment hidden (mozreview-request)
Assignee: nobody → mdeboer
Status: NEW → ASSIGNED

Comment 2

2 years ago
mozreview-review
Comment on attachment 8904251 [details]
Bug 1396581 - Allow retrieving DownloadHistoryList objects that show private downloads.

https://reviewboard.mozilla.org/r/176028/#review181078

::: toolkit/components/jsdownloads/src/DownloadHistory.jsm:69
(Diff revision 1)
>     * @rejects JavaScript exception.
>     */
> -  getList() {
> -    if (!this._promiseList) {
> -      this._promiseList = Downloads.getList(Downloads.PUBLIC).then(list => {
> +  getList({type = Downloads.PUBLIC} = {}) {
> +    let key = type;
> +
> +    if (!this._listPromises[key]) {

nit: I'm not sure I understand the reason to reassign type to key, it just seems to increase code footprint with micro benefits.
Attachment #8904251 - Flags: review?(mak77) → review+
Assignee

Updated

2 years ago
Attachment #8904251 - Attachment is obsolete: true
Assignee

Updated

2 years ago
Attachment #8904251 - Attachment is obsolete: false
Comment hidden (mozreview-request)
Assignee

Updated

2 years ago
Attachment #8904251 - Attachment is obsolete: true
Assignee

Comment 5

2 years ago
Hi Marco, the previous push was done by Paolo, which means I can't take over that MozReview ID and push to it :/ So that's why you need to r+ the patch again, I'm afraid.

Comment 6

2 years ago
mozreview-review
Comment on attachment 8904477 [details]
Bug 1396581 - Allow retrieving DownloadHistoryList objects that show private downloads.

https://reviewboard.mozilla.org/r/176330/#review181232
Attachment #8904477 - Flags: review?(mak77) → review+

Comment 7

2 years ago
Pushed by mdeboer@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f12d13ff72de
Allow retrieving DownloadHistoryList objects that show private downloads. r=mak
https://hg.mozilla.org/mozilla-central/rev/f12d13ff72de
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.