summaryrefslogtreecommitdiffstats
path: root/application/basilisk/components/preferences/cookies.js
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@wolfbeast.com>2019-03-25 18:03:03 +0100
committerGitHub <noreply@github.com>2019-03-25 18:03:03 +0100
commitaa816b3d848d38c83204c3dd1a1d0b86013978b4 (patch)
treee96cabae4a274f8bf5a53c12a9b200fbf47d74f1 /application/basilisk/components/preferences/cookies.js
parent24b1f14e0264152242a260dbc7e48b62206d1b17 (diff)
parent1413b3d6fd7297014d35d862abc792dc30c1ec24 (diff)
downloadUXP-aa816b3d848d38c83204c3dd1a1d0b86013978b4.tar
UXP-aa816b3d848d38c83204c3dd1a1d0b86013978b4.tar.gz
UXP-aa816b3d848d38c83204c3dd1a1d0b86013978b4.tar.lz
UXP-aa816b3d848d38c83204c3dd1a1d0b86013978b4.tar.xz
UXP-aa816b3d848d38c83204c3dd1a1d0b86013978b4.zip
Merge pull request #834 from g4jc/remove_contextid
Issue #756 - Remove Contextual Identity
Diffstat (limited to 'application/basilisk/components/preferences/cookies.js')
-rw-r--r--application/basilisk/components/preferences/cookies.js39
1 files changed, 3 insertions, 36 deletions
diff --git a/application/basilisk/components/preferences/cookies.js b/application/basilisk/components/preferences/cookies.js
index c420855f8..4ede5b6e6 100644
--- a/application/basilisk/components/preferences/cookies.js
+++ b/application/basilisk/components/preferences/cookies.js
@@ -7,12 +7,8 @@ const nsICookie = Components.interfaces.nsICookie;
Components.utils.import("resource://gre/modules/AppConstants.jsm");
Components.utils.import("resource://gre/modules/PluralForm.jsm");
-Components.utils.import("resource://gre/modules/Services.jsm")
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
- "resource://gre/modules/ContextualIdentityService.jsm");
-
var gCookiesWindow = {
_cm : Components.classes["@mozilla.org/cookiemanager;1"]
.getService(Components.interfaces.nsICookieManager),
@@ -38,10 +34,6 @@ var gCookiesWindow = {
this._populateList(true);
document.getElementById("filter").focus();
-
- if (!Services.prefs.getBoolPref("privacy.userContext.enabled")) {
- document.getElementById("userContextRow").hidden = true;
- }
},
uninit: function () {
@@ -82,24 +74,11 @@ var gCookiesWindow = {
aCookieB.originAttributes);
},
- _isPrivateCookie: function (aCookie) {
- let { userContextId } = aCookie.originAttributes;
- if (!userContextId) {
- // Default identity is public.
- return false;
- }
- return !ContextualIdentityService.getIdentityFromId(userContextId).public;
- },
-
observe: function (aCookie, aTopic, aData) {
if (aTopic != "cookie-changed")
return;
if (aCookie instanceof Components.interfaces.nsICookie) {
- if (this._isPrivateCookie(aCookie)) {
- return;
- }
-
var strippedHost = this._makeStrippedHost(aCookie.host);
if (aData == "changed")
this._handleCookieChanged(aCookie, strippedHost);
@@ -498,9 +477,6 @@ var gCookiesWindow = {
while (e.hasMoreElements()) {
var cookie = e.getNext();
if (cookie && cookie instanceof Components.interfaces.nsICookie) {
- if (this._isPrivateCookie(cookie)) {
- continue;
- }
var strippedHost = this._makeStrippedHost(cookie.host);
this._addCookie(strippedHost, cookie, hostCount);
@@ -524,17 +500,9 @@ var gCookiesWindow = {
return this._bundle.getString("expireAtEndOfSession");
},
- _getUserContextString: function(aUserContextId) {
- if (parseInt(aUserContextId) == 0) {
- return this._bundle.getString("defaultUserContextLabel");
- }
-
- return ContextualIdentityService.getUserContextLabel(aUserContextId);
- },
-
_updateCookieData: function (aItem) {
var seln = this._view.selection;
- var ids = ["name", "value", "host", "path", "isSecure", "expires", "userContext"];
+ var ids = ["name", "value", "host", "path", "isSecure", "expires"];
var properties;
if (aItem && !aItem.container && seln.count > 0) {
@@ -543,8 +511,7 @@ var gCookiesWindow = {
isDomain: aItem.isDomain ? this._bundle.getString("domainColon")
: this._bundle.getString("hostColon"),
isSecure: aItem.isSecure ? this._bundle.getString("forSecureOnly")
- : this._bundle.getString("forAnyConnection"),
- userContext: this._getUserContextString(aItem.originAttributes.userContextId) };
+ : this._bundle.getString("forAnyConnection") };
for (let id of ids) {
document.getElementById(id).disabled = false;
}
@@ -553,7 +520,7 @@ var gCookiesWindow = {
var noneSelected = this._bundle.getString("noCookieSelected");
properties = { name: noneSelected, value: noneSelected, host: noneSelected,
path: noneSelected, expires: noneSelected,
- isSecure: noneSelected, userContext: noneSelected };
+ isSecure: noneSelected };
for (let id of ids) {
document.getElementById(id).disabled = true;
}