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

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

Issue 1907263002: DevTools: Fix all outstanding JavaScript style issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove yoda disable. fix throw parens Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698