From 56a87e23b504c8dac371ad3742f94db1541e9a98 Mon Sep 17 00:00:00 2001 From: malayaleecoder Date: Tue, 26 Jan 2016 14:54:21 +0100 Subject: [PATCH] Bug 1234875 - Remove alwaysAcceptSessionCookies pref. r=mak --- extensions/cookie/nsCookiePermission.cpp | 7 ------- extensions/cookie/nsCookiePermission.h | 2 -- modules/libpref/init/all.js | 1 - 3 files changed, 10 deletions(-) diff --git a/extensions/cookie/nsCookiePermission.cpp b/extensions/cookie/nsCookiePermission.cpp index 5b50c58e214..3d8e2ad3e3d 100644 --- a/extensions/cookie/nsCookiePermission.cpp +++ b/extensions/cookie/nsCookiePermission.cpp @@ -45,7 +45,6 @@ static const uint32_t ACCEPT_FOR_N_DAYS = 3; static const bool kDefaultPolicy = true; static const char kCookiesLifetimePolicy[] = "network.cookie.lifetimePolicy"; static const char kCookiesLifetimeDays[] = "network.cookie.lifetime.days"; -static const char kCookiesAlwaysAcceptSession[] = "network.cookie.alwaysAcceptSessionCookies"; static const char kCookiesPrefsMigrated[] = "network.cookie.prefsMigrated"; // obsolete pref names for migration @@ -76,7 +75,6 @@ nsCookiePermission::Init() if (prefBranch) { prefBranch->AddObserver(kCookiesLifetimePolicy, this, false); prefBranch->AddObserver(kCookiesLifetimeDays, this, false); - prefBranch->AddObserver(kCookiesAlwaysAcceptSession, this, false); PrefChanged(prefBranch, nullptr); // migration code for original cookie prefs @@ -122,11 +120,6 @@ nsCookiePermission::PrefChanged(nsIPrefBranch *aPrefBranch, NS_SUCCEEDED(aPrefBranch->GetIntPref(kCookiesLifetimeDays, &val))) // save cookie lifetime in seconds instead of days mCookiesLifetimeSec = val * 24 * 60 * 60; - - bool bval; - if (PREF_CHANGED(kCookiesAlwaysAcceptSession) && - NS_SUCCEEDED(aPrefBranch->GetBoolPref(kCookiesAlwaysAcceptSession, &bval))) - mCookiesAlwaysAcceptSession = bval; } NS_IMETHODIMP diff --git a/extensions/cookie/nsCookiePermission.h b/extensions/cookie/nsCookiePermission.h index d64720812f4..d683f206acf 100644 --- a/extensions/cookie/nsCookiePermission.h +++ b/extensions/cookie/nsCookiePermission.h @@ -24,7 +24,6 @@ public: nsCookiePermission() : mCookiesLifetimeSec(INT64_MAX) , mCookiesLifetimePolicy(0) // ACCEPT_NORMALLY - , mCookiesAlwaysAcceptSession(false) {} bool Init(); @@ -40,7 +39,6 @@ private: int64_t mCookiesLifetimeSec; // lifetime limit specified in seconds uint8_t mCookiesLifetimePolicy; // pref for how long cookies are stored - bool mCookiesAlwaysAcceptSession; // don't prompt for session cookies }; // {EF565D0A-AB9A-4A13-9160-0644CDFD859A} diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index c6eff239bda..01fb64941b0 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -1858,7 +1858,6 @@ pref("network.cookie.cookieBehavior", 0); // Keep the old default of accep #endif pref("network.cookie.thirdparty.sessionOnly", false); pref("network.cookie.lifetimePolicy", 0); // 0-accept, 1-dontUse 2-acceptForSession, 3-acceptForNDays -pref("network.cookie.alwaysAcceptSessionCookies", false); pref("network.cookie.prefsMigrated", false); pref("network.cookie.lifetime.days", 90); // Ignored unless network.cookie.lifetimePolicy is 3.