Commit 12a5b451 authored by henry's avatar henry Committed by morgan
Browse files

fixup! BB 40925: Implemented the Security Level component

BB 45201: Move security level settings to the settings config.
parent ca329cd8
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7,6 +7,10 @@
import { SettingGroupManager } from "chrome://browser/content/preferences/config/SettingGroupManager.mjs";
import { Preferences } from "chrome://global/content/preferences/Preferences.mjs";

ChromeUtils.importESModule(
  "chrome://browser/content/securitylevel/config/security-level.mjs",
  { global: "current" }
);
ChromeUtils.importESModule(
  "chrome://browser/content/preferences/config/protections-from-apps.mjs",
  { global: "current" }
+1 −0
Original line number Diff line number Diff line
@@ -397,6 +397,7 @@ const CONFIG_PANES = Object.freeze({
      "ipprotection",
      "cookiesAndSiteData2",
      "history2",
      "securityLevelGroup",
      "nonTechnicalPrivacy2",
      "dnsOverHttps",
      "connectionLink",
+2 −1
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@
    href="chrome://browser/content/preferences/letterboxing.css"
  />

  <link rel="stylesheet" href="chrome://browser/content/securitylevel/securityLevelPreferences.css" />

  <link rel="localization" href="branding/brand.ftl"/>
  <link rel="localization" href="browser/browser.ftl"/>
@@ -106,6 +105,8 @@
  <script type="module" src="chrome://browser/content/preferences/widgets/update-information.mjs"></script>
  <script type="module" src="chrome://browser/content/preferences/widgets/update-state.mjs"></script>
  <script type="module" src="chrome://browser/content/ipprotection/bandwidth-usage.mjs"></script>
  <script type="module" src="chrome://browser/content/securitylevel/widgets/security-level-description.mjs"></script>
  <script type="module" src="chrome://browser/content/securitylevel/widgets/security-level-display.mjs"></script>
</head>

<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+1 −1
Original line number Diff line number Diff line
@@ -578,7 +578,7 @@
  <html:h1 data-l10n-id="security-header"/>
</hbox>

#include ../securitylevel/content/securityLevelPreferences.inc.xhtml
<html:setting-group groupid="securityLevelGroup" data-category="panePrivacy" hidden="true" data-srd-migrated=""></html:setting-group>

<!-- addons, forgery (phishing) UI Security -->
<html:setting-group groupid="browsingProtection" data-category="panePrivacy" hidden="true" data-hidden-from-search="true" data-srd-migrated=""></html:setting-group>
+1 −18
Original line number Diff line number Diff line
@@ -60,13 +60,6 @@ ChromeUtils.defineLazyGetter(lazy, "gParentalControlsService", () =>
    : null
);

// TODO: module import via ChromeUtils.defineModuleGetter
XPCOMUtils.defineLazyScriptGetter(
  this,
  ["SecurityLevelPreferences"],
  "chrome://browser/content/securitylevel/securityLevel.js"
);

XPCOMUtils.defineLazyPreferenceGetter(
  this,
  "gIsFirstPartyIsolated",
@@ -150,16 +143,6 @@ function initTCPStandardSection() {
var gPrivacyPane = {
  _pane: null,

  /**
   * Show the Security Level UI
   */
  _initSecurityLevel() {
    SecurityLevelPreferences.init();
    window.addEventListener("unload", () => SecurityLevelPreferences.uninit(), {
      once: true,
    });
  },

  /**
   * Whether the prompt to restart Firefox should appear when changing the autostart pref.
   */
@@ -653,6 +636,7 @@ var gPrivacyPane = {
    initSettingGroup("etpReset");
    initSettingGroup("etpCustomize");
    initSettingGroup("networkProxy");
    initSettingGroup("securityLevelGroup");

    /* Initialize Content Blocking */
    this.initContentBlocking();
@@ -662,7 +646,6 @@ var gPrivacyPane = {
    this.networkCookieBehaviorReadPrefs();
    this._initTrackingProtectionExtensionControl();
    this._ensureTrackingProtectionExceptionListMigration();
    this._initSecurityLevel();

    Preferences.get("privacy.trackingprotection.enabled").on(
      "change",
Loading