summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-04-08 00:23:23 +0200
committerMoonchild <moonchild@palemoon.org>2022-04-08 00:23:23 +0200
commitc61754591470ec30534d824c57f5c868bbfd7a22 (patch)
tree649df870738a644681017b8297f03ba7e4f41a85 /toolkit
parentee4e449e043f010b8eb177e8f84ef7678436ffa1 (diff)
downloaduxp-c61754591470ec30534d824c57f5c868bbfd7a22.tar.gz
Issue #1822 - Follow-up: Remove reputation check leftovers from jsdownloads.
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/components/jsdownloads/src/DownloadCore.jsm42
1 files changed, 1 insertions, 41 deletions
diff --git a/toolkit/components/jsdownloads/src/DownloadCore.jsm b/toolkit/components/jsdownloads/src/DownloadCore.jsm
index 4be4911a66..72ad26850b 100644
--- a/toolkit/components/jsdownloads/src/DownloadCore.jsm
+++ b/toolkit/components/jsdownloads/src/DownloadCore.jsm
@@ -370,12 +370,6 @@ this.Download.prototype = {
message: "Cannot start after finalization."}));
}
- if (this.error && this.error.becauseBlockedByReputationCheck) {
- return Promise.reject(new DownloadError({
- message: "Cannot start after being blocked " +
- "by a reputation check."}));
- }
-
// Initialize all the status properties for a new or restarted download.
this.stopped = false;
this.canceled = false;
@@ -1533,7 +1527,6 @@ this.DownloadError = function (aProperties)
this.message = aProperties.message;
} else if (aProperties.becauseBlocked ||
aProperties.becauseBlockedByParentalControls ||
- aProperties.becauseBlockedByReputationCheck ||
aProperties.becauseBlockedByRuntimePermissions) {
this.message = "Download blocked.";
} else {
@@ -1558,10 +1551,6 @@ this.DownloadError = function (aProperties)
if (aProperties.becauseBlockedByParentalControls) {
this.becauseBlocked = true;
this.becauseBlockedByParentalControls = true;
- } else if (aProperties.becauseBlockedByReputationCheck) {
- this.becauseBlocked = true;
- this.becauseBlockedByReputationCheck = true;
- this.reputationCheckVerdict = aProperties.reputationCheckVerdict || "";
} else if (aProperties.becauseBlockedByRuntimePermissions) {
this.becauseBlocked = true;
this.becauseBlockedByRuntimePermissions = true;
@@ -1576,16 +1565,6 @@ this.DownloadError = function (aProperties)
this.stack = new Error().stack;
}
-/**
- * These constants are used by the reputationCheckVerdict property and indicate
- * the detailed reason why a download is blocked.
- *
- * @note These values should not be changed because they can be serialized.
- */
-this.DownloadError.BLOCK_VERDICT_MALWARE = "Malware";
-this.DownloadError.BLOCK_VERDICT_POTENTIALLY_UNWANTED = "PotentiallyUnwanted";
-this.DownloadError.BLOCK_VERDICT_UNCOMMON = "Uncommon";
-
this.DownloadError.prototype = {
__proto__: Error.prototype,
@@ -1617,12 +1596,6 @@ this.DownloadError.prototype = {
becauseBlockedByParentalControls: false,
/**
- * Indicates the download was blocked because it failed the reputation check
- * and may be malware.
- */
- becauseBlockedByReputationCheck: false,
-
- /**
* Indicates the download was blocked because a runtime permission required to
* download files was not granted.
*
@@ -1631,15 +1604,6 @@ this.DownloadError.prototype = {
becauseBlockedByRuntimePermissions: false,
/**
- * If becauseBlockedByReputationCheck is true, indicates the detailed reason
- * why the download was blocked, according to the "BLOCK_VERDICT_" constants.
- *
- * If the download was not blocked or the reason for the block is unknown,
- * this will be an empty string.
- */
- reputationCheckVerdict: "",
-
- /**
* If this DownloadError was caused by an exception this property will
* contain the original exception. This will not be serialized when saving
* to the store.
@@ -1660,9 +1624,7 @@ this.DownloadError.prototype = {
becauseTargetFailed: this.becauseTargetFailed,
becauseBlocked: this.becauseBlocked,
becauseBlockedByParentalControls: this.becauseBlockedByParentalControls,
- becauseBlockedByReputationCheck: this.becauseBlockedByReputationCheck,
becauseBlockedByRuntimePermissions: this.becauseBlockedByRuntimePermissions,
- reputationCheckVerdict: this.reputationCheckVerdict,
};
serializeUnknownProperties(this, serializable);
@@ -1687,9 +1649,7 @@ this.DownloadError.fromSerializable = function (aSerializable) {
property != "becauseTargetFailed" &&
property != "becauseBlocked" &&
property != "becauseBlockedByParentalControls" &&
- property != "becauseBlockedByReputationCheck" &&
- property != "becauseBlockedByRuntimePermissions" &&
- property != "reputationCheckVerdict");
+ property != "becauseBlockedByRuntimePermissions");
return e;
};