Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js

Issue 1827743002: SameSite: Teach devtools about the new 'samesite' syntax. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback+Rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js b/third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js
index 1bea7702ad4e362dc36dd8bd4b13037c282d4dd4..98b53de4407a740030bd8465e7515413fb0c3880 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js
@@ -258,11 +258,11 @@ WebInspector.Cookie.prototype = {
},
/**
- * @return {boolean}
+ * @return {string}
*/
sameSite: function ()
{
- return "samesite" in this._attributes;
+ return this._attributes["samesite"];
},
/**
@@ -382,6 +382,15 @@ WebInspector.Cookie.Type = {
Response: 1
};
+/**
+ * @enum {string}
+ */
+WebInspector.Cookie.SameSiteMode = {
+ Strict: "Strict",
+ Lax: "Lax",
+ NoRestriction: "NoRestriction"
+};
+
WebInspector.Cookies = {}
/**
@@ -429,7 +438,7 @@ WebInspector.Cookies._parseProtocolCookie = function(target, protocolCookie)
if (protocolCookie["secure"])
cookie.addAttribute("secure");
if (protocolCookie["sameSite"])
- cookie.addAttribute("sameSite");
+ cookie.addAttribute("sameSite", protocolCookie["sameSite"]);
cookie.setSize(protocolCookie["size"]);
return cookie;
}

Powered by Google App Engine
This is Rietveld 408576698