зеркало из https://github.com/mozilla/pjs.git
Bug 337231 - Migrate Opera's "Accept Cookies Session Only" preference into network.cookie.lifetimePolicy instead of the unused network.cookie.enableForCurrentSessionOnly. r=gavin, a=schrep
This commit is contained in:
Родитель
be0e9656b5
Коммит
ac925be43b
|
@ -316,7 +316,7 @@ static
|
|||
nsOperaProfileMigrator::PrefTransform gTransforms[] = {
|
||||
{ "User Prefs", "Download Directory", _OPM(STRING), "browser.download.dir", _OPM(SetFile), PR_FALSE, -1 },
|
||||
{ nsnull, "Enable Cookies", _OPM(INT), "network.cookie.cookieBehavior", _OPM(SetCookieBehavior), PR_FALSE, -1 },
|
||||
{ nsnull, "Accept Cookies Session Only", _OPM(BOOL), "network.cookie.enableForCurrentSessionOnly", _OPM(SetBool), PR_FALSE, -1 },
|
||||
{ nsnull, "Accept Cookies Session Only", _OPM(BOOL), "network.cookie.lifetimePolicy", _OPM(SetCookieLifetime), PR_FALSE, -1 },
|
||||
{ nsnull, "Allow script to resize window", _OPM(BOOL), "dom.disable_window_move_resize", _OPM(SetBool), PR_FALSE, -1 },
|
||||
{ nsnull, "Allow script to move window", _OPM(BOOL), "dom.disable_window_move_resize", _OPM(SetBool), PR_FALSE, -1 },
|
||||
{ nsnull, "Allow script to raise window", _OPM(BOOL), "dom.disable_window_flip", _OPM(SetBool), PR_FALSE, -1 },
|
||||
|
@ -353,6 +353,13 @@ nsOperaProfileMigrator::SetCookieBehavior(void* aTransform, nsIPrefBranch* aBran
|
|||
return aBranch->SetIntPref(xform->targetPrefName, val);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsOperaProfileMigrator::SetCookieLifetime(void* aTransform, nsIPrefBranch* aBranch)
|
||||
{
|
||||
PrefTransform* xform = (PrefTransform*)aTransform;
|
||||
return aBranch->SetIntPref(xform->targetPrefName, xform->boolValue ? 2 : 0);
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsOperaProfileMigrator::SetImageBehavior(void* aTransform, nsIPrefBranch* aBranch)
|
||||
{
|
||||
|
|
|
@ -89,6 +89,7 @@ public:
|
|||
|
||||
static nsresult SetFile(void* aTransform, nsIPrefBranch* aBranch);
|
||||
static nsresult SetCookieBehavior(void* aTransform, nsIPrefBranch* aBranch);
|
||||
static nsresult SetCookieLifetime(void* aTransform, nsIPrefBranch* aBranch);
|
||||
static nsresult SetImageBehavior(void* aTransform, nsIPrefBranch* aBranch);
|
||||
static nsresult SetBool(void* aTransform, nsIPrefBranch* aBranch);
|
||||
static nsresult SetWString(void* aTransform, nsIPrefBranch* aBranch);
|
||||
|
|
Загрузка…
Ссылка в новой задаче