Closed
Bug 494550
Opened 15 years ago
Closed 15 years ago
Get nsIDownloadManager initialization out of startup path
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mfinkle, Assigned: mfinkle)
References
Details
Attachments
(1 file)
10.40 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
Bug 489686 landed some fixes to reduce a Ts regression. The result seemed to have no affect on Ts. This might be due to the initialization of the nsIDownloadManager in the DownloadsView.init() method. We add a listener so we can display popup alerts when a file is downloaded. We should try to use the observer notification fired by the nsIDownloadManager ("download-started") to display the initial popup alert and then attach the listener so we get the download complete trigger too. This should keep the download manager out of the startup path.
Assignee | ||
Updated•15 years ago
|
tracking-fennec: --- → ?
Assignee | ||
Updated•15 years ago
|
Assignee: nobody → mark.finkle
Assignee | ||
Comment 1•15 years ago
|
||
This patch gets the DM out of our explicit startup patch. There might be other ways the DM is being intialized, but we can track those down as we find them. This patch uses the ObserverService to listen for notifications sent by the DM when a file download starts/ends. The patch removes the download progress listener we were using to monitor downloads for alerts. The patch adds nsISupportsWeakReference to downloads and extensions for the ObserverService. The patch adjusts the alert XUL so long text breaks correctly and doesn't just cause the alert to get wider.
Attachment #379681 -
Flags: review?(gavin.sharp)
Updated•15 years ago
|
Attachment #379681 -
Flags: review?(gavin.sharp) → review+
Comment 2•15 years ago
|
||
Comment on attachment 379681 [details] [diff] [review] patch >diff --git a/chrome/content/downloads.js b/chrome/content/downloads.js > init: function dv_init() { >+ var os = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService); >+ os.addObserver(this, "dl-start", true); >+ os.addObserver(this, "dl-failed", true); >+ os.addObserver(this, "dl-done", true); what about dl-blocked/dl-dirty/dl-cancel? I guess blocked/dirty can't currently happen since we don't have a backend for scanning, and cancel can't happen outside of our UI? Probably wouldn't hurt to listen for these anyways, though...
Assignee | ||
Comment 3•15 years ago
|
||
Added the other dl-* notifications. Pushed: http://hg.mozilla.org/mobile-browser/rev/5bbb4c203890
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
tracking-fennec: ? → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•