summaryrefslogtreecommitdiffstats
path: root/browser/components/enterprisepolicies/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/enterprisepolicies/helpers')
-rw-r--r--browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs24
-rw-r--r--browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs4
2 files changed, 26 insertions, 2 deletions
diff --git a/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs b/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs
index 393b9bb85e..80968956ac 100644
--- a/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs
+++ b/browser/components/enterprisepolicies/helpers/ProxyPolicies.sys.mjs
@@ -29,6 +29,22 @@ export var PROXY_TYPES_MAP = new Map([
["autoConfig", Ci.nsIProtocolProxyService.PROXYCONFIG_PAC],
]);
+let proxyPreferences = [
+ "network.proxy.type",
+ "network.proxy.autoconfig_url",
+ "network.proxy.socks_remote_dns",
+ "signon.autologin.proxy",
+ "network.proxy.socks_version",
+ "network.proxy.no_proxies_on",
+ "network.proxy.share_proxy_settings",
+ "network.proxy.http",
+ "network.proxy.http_port",
+ "network.proxy.ssl",
+ "network.proxy.ssl_port",
+ "network.proxy.socks",
+ "network.proxy.socks_port",
+];
+
export var ProxyPolicies = {
configureProxySettings(param, setPref) {
if (param.Mode) {
@@ -105,5 +121,13 @@ export var ProxyPolicies = {
if (param.SOCKSProxy) {
setProxyHostAndPort("socks", param.SOCKSProxy);
}
+
+ // All preferences should be locked regardless of whether or not a
+ // specific value was set.
+ if (param.Locked) {
+ for (let preference of proxyPreferences) {
+ Services.prefs.lockPref(preference);
+ }
+ }
},
};
diff --git a/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs b/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs
index 81f7955f27..26bae7acd9 100644
--- a/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs
+++ b/browser/components/enterprisepolicies/helpers/WebsiteFilter.sys.mjs
@@ -130,10 +130,10 @@ export let WebsiteFilter = {
}
return Ci.nsIContentPolicy.ACCEPT;
},
- shouldProcess(contentLocation, loadInfo) {
+ shouldProcess() {
return Ci.nsIContentPolicy.ACCEPT;
},
- observe(subject, topic, data) {
+ observe(subject) {
try {
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
if (