Bug 269799 - Clearing cookies using either Clear Private Data or the Clear All button in the privacy prefpane doesn't update the Cookies Manager until it's reopened. r=mconnor.

This commit is contained in:
mozilla.mano@sent.com 2007-10-02 20:35:27 -07:00
parent a2295973ec
commit 5e00cb978a

View File

@ -155,16 +155,7 @@ Sanitizer.prototype = {
{
var cookieMgr = Components.classes["@mozilla.org/cookiemanager;1"]
.getService(Components.interfaces.nsICookieManager);
var e = cookieMgr.enumerator;
var cookies = [];
var cookie;
while (e.hasMoreElements()) {
cookie = e.getNext().QueryInterface(Components.interfaces.nsICookie);
cookies.push(cookie);
}
for (var i = 0; i < cookies.length; ++i)
cookieMgr.remove(cookies[i].host, cookies[i].name, cookies[i].path, false);
cookieMgr.removeAll();
},
get canClear()