Commit 51864e05 authored by Michael Kaply's avatar Michael Kaply
Browse files

Bug 1429179 - Add policy to clear data on shutdown. r=felipe

MozReview-Commit-ID: canswg76ZN
parent aa63116f
......@@ -573,6 +573,22 @@ var Policies = {
}
},
"SanitizeOnShutdown": {
onBeforeUIStartup(manager, param) {
setAndLockPref("privacy.sanitize.sanitizeOnShutdown", param);
if (param) {
setAndLockPref("privacy.clearOnShutdown.cache", true);
setAndLockPref("privacy.clearOnShutdown.cookies", true);
setAndLockPref("privacy.clearOnShutdown.downloads", true);
setAndLockPref("privacy.clearOnShutdown.formdata", true);
setAndLockPref("privacy.clearOnShutdown.history", true);
setAndLockPref("privacy.clearOnShutdown.sessions", true);
setAndLockPref("privacy.clearOnShutdown.siteSettings", true);
setAndLockPref("privacy.clearOnShutdown.offlineApps", true);
}
}
},
"SearchBar": {
onAllWindowsRestored(manager, param) {
// This policy is meant to change the default behavior, not to force it.
......
......@@ -516,6 +516,13 @@
"type": "boolean"
},
"SanitizeOnShutdown": {
"description": "Clears ALL browser data on shutdown.",
"first_available": "60.0",
"type": "boolean"
},
"SearchBar": {
"description": "Sets the default location of the search bar. Only applies on firtrun, but can be changed.",
"first_available": "60.0",
......
......@@ -126,6 +126,24 @@ const POLICIES_TESTS = [
"xpinstall.enabled": false,
}
},
// POLICY: SanitizeOnShutdown
{
policies: {
"SanitizeOnShutdown": true,
},
lockedPrefs: {
"privacy.sanitize.sanitizeOnShutdown": true,
"privacy.clearOnShutdown.cache": true,
"privacy.clearOnShutdown.cookies": true,
"privacy.clearOnShutdown.downloads": true,
"privacy.clearOnShutdown.formdata": true,
"privacy.clearOnShutdown.history": true,
"privacy.clearOnShutdown.sessions": true,
"privacy.clearOnShutdown.siteSettings": true,
"privacy.clearOnShutdown.offlineApps": true,
}
},
];
add_task(async function test_policy_remember_passwords() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment