forked from mirrors/gecko-dev
Bug 1882603 - don't show Content Analysis Block result if pref is set r=dlp-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D205153
This commit is contained in:
parent
b9f5ce64d8
commit
7d60f7e735
1 changed files with 11 additions and 0 deletions
|
|
@ -42,6 +42,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
"A DLP agent"
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
lazy,
|
||||
"showBlockedResult",
|
||||
"browser.contentanalysis.show_blocked_result",
|
||||
true
|
||||
);
|
||||
|
||||
/**
|
||||
* A class that groups browsing contexts by their top-level one.
|
||||
* This is necessary because if there may be a subframe that
|
||||
|
|
@ -705,6 +712,10 @@ export const ContentAnalysis = {
|
|||
lazy.gContentAnalysis.respondToWarnDialog(aRequestToken, allow);
|
||||
return null;
|
||||
case Ci.nsIContentAnalysisResponse.eBlock:
|
||||
if (!lazy.showBlockedResult) {
|
||||
// Don't show anything
|
||||
return null;
|
||||
}
|
||||
message = await this.l10n.formatValue("contentanalysis-block-message", {
|
||||
content: this._getResourceNameFromNameOrOperationType(
|
||||
aResourceNameOrOperationType
|
||||
|
|
|
|||
Loading…
Reference in a new issue