Revert "[PALEMOON] Reimplemented selection internet zone information on downloaded files"

This commit is contained in:
Moonchild 2018-04-20 13:51:38 +00:00 • committed by Roy Tam
commit 45bda44918
2 changed files with 0 additions and 40 deletions

View file

@ -530,37 +530,6 @@ this.DownloadIntegration = {
* @return true if files should be marked
*/
_shouldSaveZoneInformation() {
#ifdef MC_PALEMOON
let zonePref = 2;
try {
zonePref = Services.prefs.getIntPref("browser.download.saveZoneInformation");
} catch (ex) {}
switch (zonePref) {
case 0: // Never
return false;
case 1: // Always
return true;
case 2: // System-defined
let key = Cc["@mozilla.org/windows-registry-key;1"]
.createInstance(Ci.nsIWindowsRegKey);
try {
key.open(Ci.nsIWindowsRegKey.ROOT_KEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Attachments",
Ci.nsIWindowsRegKey.ACCESS_QUERY_VALUE);
try {
return key.readIntValue("SaveZoneInformation") != 1;
} finally {
key.close();
}
} catch (ex) {
// If the key is not present, files should be marked by default.
return true;
}
default: // Invalid pref value defaults marking files.
return true;
}
#else
let key = Cc["@mozilla.org/windows-registry-key;1"]
.createInstance(Ci.nsIWindowsRegKey);
try {
@ -576,7 +545,6 @@ this.DownloadIntegration = {
// If the key is not present, files should be marked by default.
return true;
}
#endif
},
#endif