mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-28 19:38:13 +00:00
Fixing 315976. Also adding form history and cookies to privacy clearing
This commit is contained in:
parent
ac3f79fa07
commit
9385fb6472
@ -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"]
|
||||
|
Loading…
Reference in New Issue
Block a user