bug 285440 - UI to clear SSL session, also clears http auth, r=dveditz, a=bsmedberg

This commit is contained in:
mconnor%steelgryphon.com 2005-07-26 21:38:23 +00:00
Родитель d96dfd25f2
Коммит 2e50ed5ccf
6 изменённых файлов: 31 добавлений и 0 удалений

Просмотреть файл

@ -275,6 +275,7 @@ pref("privacy.item.downloads", true);
pref("privacy.item.cookies", false);
pref("privacy.item.cache", true);
pref("privacy.item.siteprefs", false);
pref("privacy.item.sessions", true);
pref("privacy.sanitize.sanitizeOnShutdown", false);
pref("privacy.sanitize.promptOnSanitize", true);

Просмотреть файл

@ -181,6 +181,26 @@ Sanitizer.prototype = {
.getService(Components.interfaces.nsIPasswordManager);
return pwmgr.enumerator.hasMoreElements();
}
},
sessions: {
clear: function ()
{
// clear all auth tokens
var sdr = Components.classes["@mozilla.org/security/sdr;1"]
.getService(Components.interfaces.nsISecretDecoderRing);
sdr.logoutAndTeardown();
// clear plain HTTP auth sessions
var authMgr = Components.classes['@mozilla.org/network/http-auth-manager;1']
.getService(Components.interfaces.nsIHttpAuthManager);
authMgr.clearAll();
},
get canClear()
{
return true;
}
}
}
};

Просмотреть файл

@ -130,6 +130,7 @@
<preference id="privacy.item.downloads" name="privacy.item.downloads" type="bool" readonly="true"/>
<preference id="privacy.item.cookies" name="privacy.item.cookies" type="bool" readonly="true"/>
<preference id="privacy.item.cache" name="privacy.item.cache" type="bool" readonly="true"/>
<preference id="privacy.item.sessions" name="privacy.item.sessions" type="bool" readonly="true"/>
</preferences>
<preferences>
<preference id="privacy.sanitize.promptOnSanitize" name="privacy.sanitize.promptOnSanitize" type="bool" instantApply="true"/>
@ -156,6 +157,9 @@
<checkbox label="&itemCache.label;" accesskey="&itemCache.accesskey;"
preference="privacy.item.cache"
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
<checkbox label="&itemSessions.label;" accesskey="&itemSessions.accesskey;"
preference="privacy.item.sessions"
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
</groupbox>
<groupbox orient="vertical" align="start">

Просмотреть файл

@ -62,6 +62,7 @@
<preference id="privacy.item.downloads" name="privacy.item.downloads" type="bool"/>
<preference id="privacy.item.cookies" name="privacy.item.cookies" type="bool"/>
<preference id="privacy.item.cache" name="privacy.item.cache" type="bool"/>
<preference id="privacy.item.sessions" name="privacy.item.sessions" type="bool"/>
<preference id="privacy.sanitize.sanitizeOnShutdown" name="privacy.sanitize.sanitizeOnShutdown" type="bool"/>
<preference id="privacy.sanitize.promptOnSanitize" name="privacy.sanitize.promptOnSanitize" type="bool"/>
@ -78,6 +79,7 @@
<checkbox label="&itemDownloads.label;" accesskey="&itemDownloads.accesskey;" preference="privacy.item.downloads"/>
<checkbox label="&itemCookies.label;" accesskey="&itemCookies.accesskey;" preference="privacy.item.cookies"/>
<checkbox label="&itemCache.label;" accesskey="&itemCache.accesskey;" preference="privacy.item.cache"/>
<checkbox label="&itemSessions.label;" accesskey="&itemSessions.accesskey;" preference="privacy.item.sessions"/>
</groupbox>
<groupbox orient="vertical" align="start">

Просмотреть файл

@ -15,6 +15,8 @@
<!ENTITY itemCache.accesskey "a">
<!ENTITY itemDownloads.label "Download History">
<!ENTITY itemDownloads.accesskey "D">
<!ENTITY itemSessions.label "Authenticated Sessions">
<!ENTITY itemSessions.accesskey "S">
<!ENTITY settings.label "Sanitize Settings">
<!ENTITY sanitizeOnShutDown.label "Sanitize &brandShortName; on shutdown">

Просмотреть файл

@ -13,6 +13,8 @@
<!ENTITY itemCache.accesskey "a">
<!ENTITY itemDownloads.label "Download History">
<!ENTITY itemDownloads.accesskey "D">
<!ENTITY itemSessions.label "Authenticated Sessions">
<!ENTITY itemSessions.accesskey "S">
<!ENTITY promptOnSanitize.label "Ask me before Sanitizing &brandShortName;">
<!ENTITY promptOnSanitize.accesskey "k">