Chromium Code Reviews| 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..bed22656577e57ddffb7cf0a3d854259276a3330 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,14 @@ WebInspector.Cookie.Type = { |
| Response: 1 |
| }; |
| +/** |
| + * @enum {string} |
| + */ |
| +WebInspector.Cookie.SameSiteMode = { |
|
dgozman
2016/04/05 17:34:53
There should be auto-generated NetworkAgent.Cookie
Mike West
2016/04/05 17:55:10
Yeah. I'll just drop this entirely. Thanks!
|
| + Strict: "Strict", |
| + Lax: "Lax", |
| +}; |
| + |
| WebInspector.Cookies = {} |
| /** |
| @@ -428,8 +436,8 @@ WebInspector.Cookies._parseProtocolCookie = function(target, protocolCookie) |
| cookie.addAttribute("httpOnly"); |
| if (protocolCookie["secure"]) |
| cookie.addAttribute("secure"); |
| - if (protocolCookie["sameSite"]) |
| - cookie.addAttribute("sameSite"); |
| + if (protocolCookie["sameSite"] != undefined) |
|
dgozman
2016/04/05 17:34:54
Omit comparison with undefined, just |if (protocol
|
| + cookie.addAttribute("sameSite", protocolCookie["sameSite"]); |
| cookie.setSize(protocolCookie["size"]); |
| return cookie; |
| } |