diff options
author | Moonchild <moonchild@palemoon.org> | 2020-02-07 10:57:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-07 10:57:04 +0100 |
commit | 6c82d043a1fbcda650057467ae2858025290ed25 (patch) | |
tree | 0e6ed8ca0a0d12653351c67d8de62a372c954f29 /toolkit/mozapps/downloads/content/downloads.js | |
parent | a6ef90b1830e263fefda7bcb6e7b74464044a678 (diff) | |
parent | fa52fa60b70c5883acd4a8edd8e1f89c3d5f3920 (diff) | |
download | UXP-6c82d043a1fbcda650057467ae2858025290ed25.tar UXP-6c82d043a1fbcda650057467ae2858025290ed25.tar.gz UXP-6c82d043a1fbcda650057467ae2858025290ed25.tar.lz UXP-6c82d043a1fbcda650057467ae2858025290ed25.tar.xz UXP-6c82d043a1fbcda650057467ae2858025290ed25.zip |
Merge pull request #1394 from MoonchildProductions/appconst-work
The rest of removing AppConstants for Platform
Diffstat (limited to 'toolkit/mozapps/downloads/content/downloads.js')
-rw-r--r-- | toolkit/mozapps/downloads/content/downloads.js | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/toolkit/mozapps/downloads/content/downloads.js b/toolkit/mozapps/downloads/content/downloads.js index 2fdb19a74..66230592f 100644 --- a/toolkit/mozapps/downloads/content/downloads.js +++ b/toolkit/mozapps/downloads/content/downloads.js @@ -19,7 +19,6 @@ var Cu = Components.utils; Cu.import("resource://gre/modules/XPCOMUtils.jsm"); Cu.import("resource://gre/modules/DownloadUtils.jsm"); Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/AppConstants.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "PluralForm", "resource://gre/modules/PluralForm.jsm"); @@ -253,18 +252,18 @@ function openDownload(aDownload) dontAsk = !pref.getBoolPref(PREF_BDM_CONFIRMOPENEXE); } catch (e) { } - if (AppConstants.platform == "win") { - // On Vista and above, we rely on native security prompting for - // downloaded content unless it's disabled. - try { - var sysInfo = Cc["@mozilla.org/system-info;1"]. - getService(Ci.nsIPropertyBag2); - if (parseFloat(sysInfo.getProperty("version")) >= 6 && - pref.getBoolPref(PREF_BDM_SCANWHENDONE)) { - dontAsk = true; - } - } catch (ex) { } - } +#ifdef XP_WIN + // On Vista and above, we rely on native security prompting for + // downloaded content unless it's disabled. + try { + var sysInfo = Cc["@mozilla.org/system-info;1"]. + getService(Ci.nsIPropertyBag2); + if (parseFloat(sysInfo.getProperty("version")) >= 6 && + pref.getBoolPref(PREF_BDM_SCANWHENDONE)) { + dontAsk = true; + } + } catch (ex) { } +#endif if (!dontAsk) { var strings = document.getElementById("downloadStrings"); @@ -478,10 +477,11 @@ var gDownloadObserver = { removeFromView(dl); break; case "browser-lastwindow-close-granted": - if (AppConstants.platform != "macosx" && - gDownloadManager.activeDownloadCount == 0) { +#ifndef XP_MACOSX + if (gDownloadManager.activeDownloadCount == 0) { setTimeout(gCloseDownloadManager, 0); } +#endif break; } } |