зеркало из https://github.com/mozilla/pjs.git
Remap cookie prefs to be something chimera understands before we
get to the pref panel. Ignore p3p and foreign cookies.
This commit is contained in:
Родитель
ac79a72cbb
Коммит
89fa8ab607
|
@ -166,6 +166,20 @@ app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
|||
return;
|
||||
}
|
||||
|
||||
// fix up the cookie prefs. If 'p3p' or 'accept foreign cookies' are on, remap them to
|
||||
// something that chimera can deal with.
|
||||
PRInt32 acceptCookies = 0;
|
||||
static const char* kCookieBehaviorPref = "network.cookie.cookieBehavior";
|
||||
prefs->GetIntPref(kCookieBehaviorPref, &acceptCookies);
|
||||
if ( acceptCookies == 1 ) { // accept foreign cookies, assume off
|
||||
acceptCookies = 2;
|
||||
prefs->SetIntPref(kCookieBehaviorPref, acceptCookies);
|
||||
}
|
||||
else if ( acceptCookies == 3 ) { // p3p, assume all cookies on
|
||||
acceptCookies = 0;
|
||||
prefs->SetIntPref(kCookieBehaviorPref, acceptCookies);
|
||||
}
|
||||
|
||||
// get home page from Internet Config
|
||||
string = [self getICStringPref:kICWWWHomePage];
|
||||
if (string) {
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
return;
|
||||
|
||||
// Hookup cookie prefs. Relies on the tags of the radio buttons in the matrix being
|
||||
// set such that "enable all" is 0 and "disable all" is 2.
|
||||
// set such that "enable all" is 0 and "disable all" is 2. If mozilla has other prefs
|
||||
// that we don't quite know about, we assume they were remapped by the CHPreferenceManager
|
||||
// at startup.
|
||||
PRInt32 acceptCookies = 0;
|
||||
mPrefService->GetIntPref("network.cookie.cookieBehavior", &acceptCookies);
|
||||
if ( acceptCookies == 1 ) // be safe in case of importing a mozilla profile
|
||||
acceptCookies = 2;
|
||||
if ( [mCookies selectCellWithTag:acceptCookies] != YES )
|
||||
NS_WARNING("Bad value for network.cookie.cookieBehavior");
|
||||
|
||||
|
|
|
@ -166,6 +166,20 @@ app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
|||
return;
|
||||
}
|
||||
|
||||
// fix up the cookie prefs. If 'p3p' or 'accept foreign cookies' are on, remap them to
|
||||
// something that chimera can deal with.
|
||||
PRInt32 acceptCookies = 0;
|
||||
static const char* kCookieBehaviorPref = "network.cookie.cookieBehavior";
|
||||
prefs->GetIntPref(kCookieBehaviorPref, &acceptCookies);
|
||||
if ( acceptCookies == 1 ) { // accept foreign cookies, assume off
|
||||
acceptCookies = 2;
|
||||
prefs->SetIntPref(kCookieBehaviorPref, acceptCookies);
|
||||
}
|
||||
else if ( acceptCookies == 3 ) { // p3p, assume all cookies on
|
||||
acceptCookies = 0;
|
||||
prefs->SetIntPref(kCookieBehaviorPref, acceptCookies);
|
||||
}
|
||||
|
||||
// get home page from Internet Config
|
||||
string = [self getICStringPref:kICWWWHomePage];
|
||||
if (string) {
|
||||
|
|
|
@ -166,6 +166,20 @@ app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
|||
return;
|
||||
}
|
||||
|
||||
// fix up the cookie prefs. If 'p3p' or 'accept foreign cookies' are on, remap them to
|
||||
// something that chimera can deal with.
|
||||
PRInt32 acceptCookies = 0;
|
||||
static const char* kCookieBehaviorPref = "network.cookie.cookieBehavior";
|
||||
prefs->GetIntPref(kCookieBehaviorPref, &acceptCookies);
|
||||
if ( acceptCookies == 1 ) { // accept foreign cookies, assume off
|
||||
acceptCookies = 2;
|
||||
prefs->SetIntPref(kCookieBehaviorPref, acceptCookies);
|
||||
}
|
||||
else if ( acceptCookies == 3 ) { // p3p, assume all cookies on
|
||||
acceptCookies = 0;
|
||||
prefs->SetIntPref(kCookieBehaviorPref, acceptCookies);
|
||||
}
|
||||
|
||||
// get home page from Internet Config
|
||||
string = [self getICStringPref:kICWWWHomePage];
|
||||
if (string) {
|
||||
|
|
|
@ -35,11 +35,11 @@
|
|||
return;
|
||||
|
||||
// Hookup cookie prefs. Relies on the tags of the radio buttons in the matrix being
|
||||
// set such that "enable all" is 0 and "disable all" is 2.
|
||||
// set such that "enable all" is 0 and "disable all" is 2. If mozilla has other prefs
|
||||
// that we don't quite know about, we assume they were remapped by the CHPreferenceManager
|
||||
// at startup.
|
||||
PRInt32 acceptCookies = 0;
|
||||
mPrefService->GetIntPref("network.cookie.cookieBehavior", &acceptCookies);
|
||||
if ( acceptCookies == 1 ) // be safe in case of importing a mozilla profile
|
||||
acceptCookies = 2;
|
||||
if ( [mCookies selectCellWithTag:acceptCookies] != YES )
|
||||
NS_WARNING("Bad value for network.cookie.cookieBehavior");
|
||||
|
||||
|
|
|
@ -166,6 +166,20 @@ app_getModuleInfo(nsStaticModuleInfo **info, PRUint32 *count);
|
|||
return;
|
||||
}
|
||||
|
||||
// fix up the cookie prefs. If 'p3p' or 'accept foreign cookies' are on, remap them to
|
||||
// something that chimera can deal with.
|
||||
PRInt32 acceptCookies = 0;
|
||||
static const char* kCookieBehaviorPref = "network.cookie.cookieBehavior";
|
||||
prefs->GetIntPref(kCookieBehaviorPref, &acceptCookies);
|
||||
if ( acceptCookies == 1 ) { // accept foreign cookies, assume off
|
||||
acceptCookies = 2;
|
||||
prefs->SetIntPref(kCookieBehaviorPref, acceptCookies);
|
||||
}
|
||||
else if ( acceptCookies == 3 ) { // p3p, assume all cookies on
|
||||
acceptCookies = 0;
|
||||
prefs->SetIntPref(kCookieBehaviorPref, acceptCookies);
|
||||
}
|
||||
|
||||
// get home page from Internet Config
|
||||
string = [self getICStringPref:kICWWWHomePage];
|
||||
if (string) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче