Skip to content

Commit

Permalink
Rename first-party-only cookies to same-site cookies.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewest authored and Commit bot committed Feb 1, 2016
1 parent ba41625 commit 6c0bf8d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions front_end/components_lazy/CookiesTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ WebInspector.CookiesTable = function(expandable, refreshCallback, selectedCallba
{id: "size", title: WebInspector.UIString("Size"), sortable: true, align: WebInspector.DataGrid.Align.Right, weight: 7},
{id: "httpOnly", title: WebInspector.UIString("HTTP"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7},
{id: "secure", title: WebInspector.UIString("Secure"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7},
{id: "firstPartyOnly", title: WebInspector.UIString("First-Party"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7}
{id: "sameSite", title: WebInspector.UIString("Same-Site"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7}
];

if (readOnly)
Expand Down Expand Up @@ -144,7 +144,7 @@ WebInspector.CookiesTable.prototype = {
for (var i = 0; i < this._data.length; ++i) {
var item = this._data[i];
if (item.folderName) {
var groupData = {name: item.folderName, value: "", domain: "", path: "", expires: "", size: this._totalSize(item.cookies), httpOnly: "", secure: "", firstPartyOnly: ""};
var groupData = {name: item.folderName, value: "", domain: "", path: "", expires: "", size: this._totalSize(item.cookies), httpOnly: "", secure: "", sameSite: ""};
var groupNode = new WebInspector.DataGridNode(groupData);
groupNode.selectable = true;
this._dataGrid.rootNode().appendChild(groupNode);
Expand Down Expand Up @@ -227,7 +227,7 @@ WebInspector.CookiesTable.prototype = {
case "size": comparator = numberCompare.bind(null, WebInspector.Cookie.prototype.size); break;
case "httpOnly": comparator = compareTo.bind(null, WebInspector.Cookie.prototype.httpOnly); break;
case "secure": comparator = compareTo.bind(null, WebInspector.Cookie.prototype.secure); break;
case "firstPartyOnly": comparator = compareTo.bind(null, WebInspector.Cookie.prototype.firstPartyOnly); break;
case "sameSite": comparator = compareTo.bind(null, WebInspector.Cookie.prototype.sameSite); break;
default: compareTo.bind(null, WebInspector.Cookie.prototype.name);
}

Expand Down Expand Up @@ -261,7 +261,7 @@ WebInspector.CookiesTable.prototype = {
const checkmark = "\u2713";
data.httpOnly = (cookie.httpOnly() ? checkmark : "");
data.secure = (cookie.secure() ? checkmark : "");
data.firstPartyOnly = (cookie.firstPartyOnly() ? checkmark : "");
data.sameSite = (cookie.sameSite() ? checkmark : "");

var node = new WebInspector.DataGridNode(data);
node.cookie = cookie;
Expand Down
8 changes: 4 additions & 4 deletions front_end/sdk/CookieParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,9 @@ WebInspector.Cookie.prototype = {
/**
* @return {boolean}
*/
firstPartyOnly: function ()
sameSite: function ()
{
return "first-party-only" in this._attributes;
return "samesite" in this._attributes;
},

/**
Expand Down Expand Up @@ -428,8 +428,8 @@ WebInspector.Cookies._parseProtocolCookie = function(target, protocolCookie)
cookie.addAttribute("httpOnly");
if (protocolCookie["secure"])
cookie.addAttribute("secure");
if (protocolCookie["firstPartyOnly"])
cookie.addAttribute("first-party-only");
if (protocolCookie["sameSite"])
cookie.addAttribute("sameSite");
cookie.setSize(protocolCookie["size"]);
return cookie;
}
Expand Down

0 comments on commit 6c0bf8d

Please sign in to comment.