bug 129101, turn on p3p by default, r/sr=alecf/darin, a=asa

This commit is contained in:
morse%netscape.com 2002-03-26 20:19:18 +00:00
Родитель af0de84298
Коммит 5ac9ddf13c
4 изменённых файлов: 29 добавлений и 25 удалений

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

@ -330,16 +330,6 @@ cookie_CheckForPrevCookie(char * path, char * hostname, char * name) {
/* cookie utility functions */
PRIVATE void
cookie_SetBehaviorPref(PERMISSION_BehaviorEnum x, nsIPref* prefs) {
// can't have pref specifying accept-cookie-based-on-p3p if p3p module is not installed
if (x == PERMISSION_P3P) {
// pref specifies that cookie acceptance is based on site's p3p policy
nsCOMPtr<nsICookieConsent> p3p(do_GetService(NS_COOKIECONSENT_CONTRACTID));
if (!p3p) {
// p3p module is not installed, so change pref to accept-all
x = PERMISSION_Accept;
prefs->SetIntPref(cookie_behaviorPref, x);
}
}
cookie_behavior = x;
}

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

@ -1,3 +1,4 @@
<?xml version="1.0"?>
<!--
@ -84,15 +85,21 @@
gPref = Components.classes['@mozilla.org/preferences-service;1'];
gPref = gPref.getService();
gPref = gPref.QueryInterface(Components.interfaces.nsIPrefBranch);
if (gPref.getIntPref("network.cookie.cookieBehavior") == "3") {
if (gPref.getIntPref("network.cookie.cookieBehavior") == 3) {
// p3p pref is set so create an observer for changes in visibility of cookie icon
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
// make sure p3p dll exists, else we can't keep pref set
if (!("@mozilla.org/cookie-consent;1" in Components.classes)) {
gPref.setIntPref("network.cookie.cookieBehavior", 0);
} else {
// determine whether or not cookie icon in this new window should be displayed
// we need to delay before displaying icon because it hasn't been created yet
setTimeout(TestIconVisibility, 0);
// p3p pref is set so create an observer for changes in visibility of cookie icon
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
// determine whether or not cookie icon in this new window should be displayed
// we need to delay before displaying icon because it hasn't been created yet
setTimeout(TestIconVisibility, 0);
}
}
/******* THE FOLLOWING IS FOR THE TASKMENU OVERLAY *******/

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

@ -496,7 +496,7 @@ pref("network.proxy.no_proxies_on", "");
pref("network.online", true); //online/offline
pref("network.accept_cookies", 0); // 0 = Always, 1 = warn, 2 = never
pref("network.foreign_cookies", 0); // 0 = Accept, 1 = Don't accept
pref("network.cookie.cookieBehavior", 0); // 0-Accept, 1-dontAcceptForeign, 2-dontUse, 3-p3p
pref("network.cookie.cookieBehavior", 3); // 0-Accept, 1-dontAcceptForeign, 2-dontUse, 3-p3p
pref("network.cookie.warnAboutCookies", false);
pref("network.cookie.lifetime.enabled", false);
pref("network.cookie.lifetime.behavior", 0);

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

@ -1,3 +1,4 @@
<?xml version="1.0"?>
<!--
@ -84,15 +85,21 @@
gPref = Components.classes['@mozilla.org/preferences-service;1'];
gPref = gPref.getService();
gPref = gPref.QueryInterface(Components.interfaces.nsIPrefBranch);
if (gPref.getIntPref("network.cookie.cookieBehavior") == "3") {
if (gPref.getIntPref("network.cookie.cookieBehavior") == 3) {
// p3p pref is set so create an observer for changes in visibility of cookie icon
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
// make sure p3p dll exists, else we can't keep pref set
if (!("@mozilla.org/cookie-consent;1" in Components.classes)) {
gPref.setIntPref("network.cookie.cookieBehavior", 0);
} else {
// determine whether or not cookie icon in this new window should be displayed
// we need to delay before displaying icon because it hasn't been created yet
setTimeout(TestIconVisibility, 0);
// p3p pref is set so create an observer for changes in visibility of cookie icon
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
observerService.addObserver(cookieIconObserver, "cookieIcon", false);
// determine whether or not cookie icon in this new window should be displayed
// we need to delay before displaying icon because it hasn't been created yet
setTimeout(TestIconVisibility, 0);
}
}
/******* THE FOLLOWING IS FOR THE TASKMENU OVERLAY *******/