On 03/08/2013 17.26, Neil wrote:
> Do I have to watch the download lists globally in order to find out
> about new downloads (e.g. from content-disposition: attachment)?

Yes, you should add a view to the public and private download lists.

> Do I have to emulate cleanUp by calling remove() on all the completed
> downloads?

Good point. While you could do that for now, we'll likely add a method
to the DownloadList object, since it's an existing use case. Just filed
bug 901262.

> Do I have to maintain the active download count myself? (I don't think
> that would be a problem.)

Yes, as there are different counts that consumers may want to track.

> Does Downloads.createDownload(aFailedDownload) replace
> aFailedDownload.retry()?

No, it's replaced by aFailedDownload.start().

> How do I watch for changes to a download if I don't know whether or not
> it's part of a download list? (But given the first answer, it looks like
> I have to watch the list whether I like it or not, and then filter on
> the download in which I'm interested.)

If a download is not part of a DownloadList, it means it doesn't appear
in the user interface and is functional to some other part of the code,
and you cannot watch it (similar to the current situation when using
nsIWebBrowserPersist without linking it to an nsITransfer).

> P.S. I hope the misspelling of succeeded is a documentation error.

Fixed, thanks!

I'll use some of these questions as the base for a more detailed
migration documentation.

Paolo
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to