Fixing 315976. Also adding form history and cookies to privacy clearing
This commit is contained in:
Родитель
f766b3bc81
Коммит
88d20702e8
|
@ -705,8 +705,13 @@ function URLBarEntered()
|
|||
{
|
||||
try
|
||||
{
|
||||
if (!gURLBar)
|
||||
return;
|
||||
|
||||
var url = gURLBar.value;
|
||||
|
||||
if (gURLBar.value == "" || gURLBar.value == null)
|
||||
return;
|
||||
|
||||
var fixedUpURI = gURIFixup.createFixupURI(url, 2 /*fixup url*/ );
|
||||
gGlobalHistory.markPageAsTyped(fixedUpURI);
|
||||
|
||||
|
|
|
@ -47,17 +47,42 @@ function writeProxyPref()
|
|||
|
||||
function sanitizeAll()
|
||||
{
|
||||
|
||||
// Cookies
|
||||
try
|
||||
{
|
||||
var cookieMgr = Components.classes["@mozilla.org/cookiemanager;1"]
|
||||
.getService(Components.interfaces.nsICookieManager);
|
||||
cookieMgr.removeAll()
|
||||
} catch (e) { }
|
||||
|
||||
|
||||
// Form Data
|
||||
try
|
||||
{
|
||||
var formHistory = Components.classes["@mozilla.org/satchel/form-history;1"]
|
||||
.getService(Components.interfaces.nsIFormHistory);
|
||||
formHistory.removeAllEntries();
|
||||
} catch (e) { }
|
||||
|
||||
// Cache
|
||||
var classID = Components.classes["@mozilla.org/network/cache-service;1"];
|
||||
var cacheService = classID.getService(Components.interfaces.nsICacheService);
|
||||
cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY);
|
||||
cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK);
|
||||
try
|
||||
{
|
||||
var classID = Components.classes["@mozilla.org/network/cache-service;1"];
|
||||
var cacheService = classID.getService(Components.interfaces.nsICacheService);
|
||||
cacheService.evictEntries(Components.interfaces.nsICache.STORE_IN_MEMORY);
|
||||
cacheService.evictEntries(Components.interfaces.nsICache.STORE_ON_DISK);
|
||||
} catch (e) { }
|
||||
|
||||
// Autocomplete
|
||||
var globalHistory = Components.classes["@mozilla.org/browser/global-history;2"]
|
||||
.getService(Components.interfaces.nsIBrowserHistory);
|
||||
globalHistory.removeAllPages();
|
||||
try
|
||||
{
|
||||
var globalHistory = Components.classes["@mozilla.org/browser/global-history;2"]
|
||||
.getService(Components.interfaces.nsIBrowserHistory);
|
||||
globalHistory.removeAllPages();
|
||||
} catch (e) { }
|
||||
|
||||
// Session History
|
||||
try
|
||||
{
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"]
|
||||
|
|
Загрузка…
Ссылка в новой задаче