--- a/toolkit/components/url-classifier/SafeBrowsing.jsm
+++ b/toolkit/components/url-classifier/SafeBrowsing.jsm
@@ -129,16 +129,17 @@ this.SafeBrowsing = {
this.registerTableWithURLs(this.flashInfobarLists[i]);
}
},
initialized: false,
phishingEnabled: false,
malwareEnabled: false,
+ downloadsEnabled: false,
passwordsEnabled: false,
trackingEnabled: false,
blockedEnabled: false,
trackingAnnotations: false,
flashBlockEnabled: false,
flashInfobarListEnabled: true,
phishingLists: [],
@@ -208,16 +209,17 @@ this.SafeBrowsing = {
},
readPrefs() {
loggingEnabled = Services.prefs.getBoolPref(PREF_DEBUG_ENABLED);
log("reading prefs");
this.phishingEnabled = Services.prefs.getBoolPref("browser.safebrowsing.phishing.enabled");
this.malwareEnabled = Services.prefs.getBoolPref("browser.safebrowsing.malware.enabled");
+ this.downloadsEnabled = Services.prefs.getBoolPref("browser.safebrowsing.downloads.enabled");
this.passwordsEnabled = Services.prefs.getBoolPref("browser.safebrowsing.passwords.enabled");
this.trackingEnabled = Services.prefs.getBoolPref("privacy.trackingprotection.enabled") || Services.prefs.getBoolPref("privacy.trackingprotection.pbmode.enabled");
this.blockedEnabled = Services.prefs.getBoolPref("browser.safebrowsing.blockedURIs.enabled");
this.trackingAnnotations = Services.prefs.getBoolPref("privacy.trackingprotection.annotate_channels");
this.flashBlockEnabled = Services.prefs.getBoolPref("plugins.flashBlock.enabled");
let flashAllowTable, flashAllowExceptTable, flashTable,
flashExceptTable, flashSubDocTable,
@@ -322,21 +324,24 @@ this.SafeBrowsing = {
}, this);
} else {
log("Update URL given but no lists managed for provider: " + provider);
}
}, this);
},
controlUpdateChecking() {
- log("phishingEnabled:", this.phishingEnabled, "malwareEnabled:",
- this.malwareEnabled, "passwordsEnabled:", this.passwordsEnabled,
+ log("phishingEnabled:", this.phishingEnabled,
+ "malwareEnabled:", this.malwareEnabled,
+ "downloadsEnabled:", this.downloadsEnabled,
+ "passwordsEnabled:", this.passwordsEnabled,
"trackingEnabled:", this.trackingEnabled,
- "blockedEnabled:", this.blockedEnabled, "trackingAnnotations",
- this.trackingAnnotations, "flashBlockEnabled", this.flashBlockEnabled,
+ "blockedEnabled:", this.blockedEnabled,
+ "trackingAnnotations", this.trackingAnnotations,
+ "flashBlockEnabled", this.flashBlockEnabled,
"flashInfobarListEnabled:", this.flashInfobarListEnabled);
let listManager = Cc["@mozilla.org/url-classifier/listmanager;1"].
getService(Ci.nsIUrlListManager);
for (let i = 0; i < this.phishingLists.length; ++i) {
if (this.phishingEnabled) {
listManager.enableUpdate(this.phishingLists[i]);
@@ -347,24 +352,24 @@ this.SafeBrowsing = {
for (let i = 0; i < this.malwareLists.length; ++i) {
if (this.malwareEnabled) {
listManager.enableUpdate(this.malwareLists[i]);
} else {
listManager.disableUpdate(this.malwareLists[i]);
}
}
for (let i = 0; i < this.downloadBlockLists.length; ++i) {
- if (this.malwareEnabled) {
+ if (this.downloadsEnabled) {
listManager.enableUpdate(this.downloadBlockLists[i]);
} else {
listManager.disableUpdate(this.downloadBlockLists[i]);
}
}
for (let i = 0; i < this.downloadAllowLists.length; ++i) {
- if (this.malwareEnabled) {
+ if (this.downloadsEnabled) {
listManager.enableUpdate(this.downloadAllowLists[i]);
} else {
listManager.disableUpdate(this.downloadAllowLists[i]);
}
}
for (let i = 0; i < this.passwordAllowLists.length; ++i) {
if (this.passwordsEnabled) {
listManager.enableUpdate(this.passwordAllowLists[i]);