mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1102184 - Deprecate the clear saved passwords on shutdown feature. r=dolske
This commit is contained in:
parent
3ed56bb494
commit
a818212fb8
@ -541,7 +541,6 @@ pref("privacy.item.cookies", false);
|
||||
|
||||
pref("privacy.clearOnShutdown.history", true);
|
||||
pref("privacy.clearOnShutdown.formdata", true);
|
||||
pref("privacy.clearOnShutdown.passwords", false);
|
||||
pref("privacy.clearOnShutdown.downloads", true);
|
||||
pref("privacy.clearOnShutdown.cookies", true);
|
||||
pref("privacy.clearOnShutdown.cache", true);
|
||||
@ -574,6 +573,8 @@ pref("privacy.sanitize.sanitizeOnShutdown", false);
|
||||
|
||||
pref("privacy.sanitize.migrateFx3Prefs", false);
|
||||
|
||||
pref("privacy.sanitize.migrateClearSavedPwdsOnExit", false);
|
||||
|
||||
pref("privacy.panicButton.enabled", true);
|
||||
|
||||
pref("network.proxy.share_proxy_settings", false); // use the same proxy settings for all protocols
|
||||
@ -1344,7 +1345,6 @@ pref("services.sync.prefs.sync.privacy.clearOnShutdown.downloads", true);
|
||||
pref("services.sync.prefs.sync.privacy.clearOnShutdown.formdata", true);
|
||||
pref("services.sync.prefs.sync.privacy.clearOnShutdown.history", true);
|
||||
pref("services.sync.prefs.sync.privacy.clearOnShutdown.offlineApps", true);
|
||||
pref("services.sync.prefs.sync.privacy.clearOnShutdown.passwords", true);
|
||||
pref("services.sync.prefs.sync.privacy.clearOnShutdown.sessions", true);
|
||||
pref("services.sync.prefs.sync.privacy.clearOnShutdown.siteSettings", true);
|
||||
pref("services.sync.prefs.sync.privacy.donottrackheader.enabled", true);
|
||||
|
@ -447,26 +447,6 @@ Sanitizer.prototype = {
|
||||
}
|
||||
},
|
||||
|
||||
passwords: {
|
||||
clear: function ()
|
||||
{
|
||||
TelemetryStopwatch.start("FX_SANITIZE_PASSWORDS");
|
||||
var pwmgr = Components.classes["@mozilla.org/login-manager;1"]
|
||||
.getService(Components.interfaces.nsILoginManager);
|
||||
// Passwords are timeless, and don't respect the timeSpan setting
|
||||
pwmgr.removeAllLogins();
|
||||
TelemetryStopwatch.finish("FX_SANITIZE_PASSWORDS");
|
||||
},
|
||||
|
||||
get canClear()
|
||||
{
|
||||
var pwmgr = Components.classes["@mozilla.org/login-manager;1"]
|
||||
.getService(Components.interfaces.nsILoginManager);
|
||||
var count = pwmgr.countLogins("", "", ""); // count all logins
|
||||
return (count > 0);
|
||||
}
|
||||
},
|
||||
|
||||
sessions: {
|
||||
clear: function ()
|
||||
{
|
||||
@ -785,6 +765,20 @@ Sanitizer._checkAndSanitize = function()
|
||||
const prefs = Sanitizer.prefs;
|
||||
if (prefs.getBoolPref(Sanitizer.prefShutdown) &&
|
||||
!prefs.prefHasUserValue(Sanitizer.prefDidShutdown)) {
|
||||
|
||||
// One time migration to remove support for the clear saved passwords on exit feature.
|
||||
if (!Services.prefs.getBoolPref("privacy.sanitize.migrateClearSavedPwdsOnExit")) {
|
||||
let deprecatedPref = "privacy.clearOnShutdown.passwords";
|
||||
let doUpdate = Services.prefs.prefHasUserValue(deprecatedPref) &&
|
||||
Services.prefs.getBoolPref(deprecatedPref);
|
||||
if (doUpdate) {
|
||||
Services.logins.removeAllLogins();
|
||||
Services.prefs.setBoolPref("signon.rememberSignons", false);
|
||||
}
|
||||
Services.prefs.clearUserPref(deprecatedPref);
|
||||
Services.prefs.setBoolPref("privacy.sanitize.migrateClearSavedPwdsOnExit", true);
|
||||
}
|
||||
|
||||
// this is a shutdown or a startup after an unclean exit
|
||||
var s = new Sanitizer();
|
||||
s.prefDomain = "privacy.clearOnShutdown.";
|
||||
|
@ -57,7 +57,6 @@ add_task(function* test_execute() {
|
||||
Services.prefs.setBoolPref("privacy.clearOnShutdown.downloads", true);
|
||||
Services.prefs.setBoolPref("privacy.clearOnShutdown.cookies", true);
|
||||
Services.prefs.setBoolPref("privacy.clearOnShutdown.formData", true);
|
||||
Services.prefs.setBoolPref("privacy.clearOnShutdown.passwords", true);
|
||||
Services.prefs.setBoolPref("privacy.clearOnShutdown.sessions", true);
|
||||
Services.prefs.setBoolPref("privacy.clearOnShutdown.siteSettings", true);
|
||||
|
||||
|
@ -34,7 +34,6 @@
|
||||
<preference id="privacy.clearOnShutdown.history" name="privacy.clearOnShutdown.history" type="bool"
|
||||
onchange="return gSanitizeDialog.onClearHistoryChanged();"/>
|
||||
<preference id="privacy.clearOnShutdown.formdata" name="privacy.clearOnShutdown.formdata" type="bool"/>
|
||||
<preference id="privacy.clearOnShutdown.passwords" name="privacy.clearOnShutdown.passwords" type="bool"/>
|
||||
<preference id="privacy.clearOnShutdown.downloads" name="privacy.clearOnShutdown.downloads" type="bool"/>
|
||||
<preference id="privacy.clearOnShutdown.cookies" name="privacy.clearOnShutdown.cookies" type="bool"/>
|
||||
<preference id="privacy.clearOnShutdown.cache" name="privacy.clearOnShutdown.cache" type="bool"/>
|
||||
@ -87,18 +86,13 @@
|
||||
<column flex="1"/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<checkbox label="&itemPasswords.label;"
|
||||
accesskey="&itemPasswords.accesskey;"
|
||||
preference="privacy.clearOnShutdown.passwords"/>
|
||||
<checkbox label="&itemOfflineApps.label;"
|
||||
accesskey="&itemOfflineApps.accesskey;"
|
||||
preference="privacy.clearOnShutdown.offlineApps"/>
|
||||
</row>
|
||||
<row>
|
||||
<checkbox label="&itemSitePreferences.label;"
|
||||
accesskey="&itemSitePreferences.accesskey;"
|
||||
preference="privacy.clearOnShutdown.siteSettings"/>
|
||||
<checkbox label="&itemOfflineApps.label;"
|
||||
accesskey="&itemOfflineApps.accesskey;"
|
||||
preference="privacy.clearOnShutdown.offlineApps"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
@ -52,8 +52,6 @@ that require it. -->
|
||||
<!ENTITY itemHistoryAndDownloads.accesskey "B">
|
||||
<!ENTITY itemFormSearchHistory.label "Form & Search History">
|
||||
<!ENTITY itemFormSearchHistory.accesskey "F">
|
||||
<!ENTITY itemPasswords.label "Saved Passwords">
|
||||
<!ENTITY itemPasswords.accesskey "P">
|
||||
<!ENTITY itemCookies.label "Cookies">
|
||||
<!ENTITY itemCookies.accesskey "C">
|
||||
<!ENTITY itemCache.label "Cache">
|
||||
|
@ -8135,15 +8135,6 @@
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Sanitize: Time it takes to sanitize recent downloads (ms)"
|
||||
},
|
||||
"FX_SANITIZE_PASSWORDS": {
|
||||
"alert_emails": ["firefox-dev@mozilla.org", "gavin@mozilla.com"],
|
||||
"expires_in_version": "50",
|
||||
"kind": "exponential",
|
||||
"high": "30000",
|
||||
"n_buckets": 20,
|
||||
"extended_statistics_ok": true,
|
||||
"description": "Sanitize: Time it takes to sanitize saved passwords (ms)"
|
||||
},
|
||||
"FX_SANITIZE_SESSIONS": {
|
||||
"alert_emails": ["firefox-dev@mozilla.org", "gavin@mozilla.com"],
|
||||
"expires_in_version": "50",
|
||||
|
Loading…
Reference in New Issue
Block a user