OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 * @return {boolean} | 253 * @return {boolean} |
254 */ | 254 */ |
255 secure: function() | 255 secure: function() |
256 { | 256 { |
257 return "secure" in this._attributes; | 257 return "secure" in this._attributes; |
258 }, | 258 }, |
259 | 259 |
260 /** | 260 /** |
261 * @return {string} | 261 * @return {string} |
262 */ | 262 */ |
263 sameSite: function () | 263 sameSite: function() |
264 { | 264 { |
265 return this._attributes["samesite"]; | 265 return this._attributes["samesite"]; |
266 }, | 266 }, |
267 | 267 |
268 /** | 268 /** |
269 * @return {boolean} | 269 * @return {boolean} |
270 */ | 270 */ |
271 session: function() | 271 session: function() |
272 { | 272 { |
273 // RFC 2965 suggests using Discard attribute to mark session cookies, bu
t this does not seem to be widely used. | 273 // RFC 2965 suggests using Discard attribute to mark session cookies, bu
t this does not seem to be widely used. |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 && (!cookie.secure() || url.scheme === "https")); | 449 && (!cookie.secure() || url.scheme === "https")); |
450 } | 450 } |
451 | 451 |
452 /** | 452 /** |
453 * @param {string} cookieDomain | 453 * @param {string} cookieDomain |
454 * @param {string} resourceDomain | 454 * @param {string} resourceDomain |
455 * @return {boolean} | 455 * @return {boolean} |
456 */ | 456 */ |
457 WebInspector.Cookies.cookieDomainMatchesResourceDomain = function(cookieDomain,
resourceDomain) | 457 WebInspector.Cookies.cookieDomainMatchesResourceDomain = function(cookieDomain,
resourceDomain) |
458 { | 458 { |
459 if (cookieDomain.charAt(0) !== '.') | 459 if (cookieDomain.charAt(0) !== ".") |
460 return resourceDomain === cookieDomain; | 460 return resourceDomain === cookieDomain; |
461 return !!resourceDomain.match(new RegExp("^([^\\.]+\\.)*" + cookieDomain.sub
string(1).escapeForRegExp() + "$", "i")); | 461 return !!resourceDomain.match(new RegExp("^([^\\.]+\\.)*" + cookieDomain.sub
string(1).escapeForRegExp() + "$", "i")); |
462 } | 462 } |
OLD | NEW |