Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2009 Joseph Pecoraro | 3 * Copyright (C) 2009 Joseph Pecoraro |
| 4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * | 9 * |
| 10 * 1. Redistributions of source code must retain the above copyright | 10 * 1. Redistributions of source code must retain the above copyright |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 /** | 31 /** |
| 32 * @unrestricted | 32 * @unrestricted |
| 33 */ | 33 */ |
| 34 Components.CookiesTable = class extends UI.VBox { | 34 Components.CookiesTable = class extends UI.VBox { |
| 35 /** | 35 /** |
| 36 * @param {boolean} expandable | 36 * @param {boolean} expandable |
| 37 * @param {function()=} refreshCallback | 37 * @param {function()=} refreshCallback |
| 38 * @param {function()=} selectedCallback | 38 * @param {function()=} selectedCallback |
| 39 * @param {string=} cookieDomain | |
| 39 */ | 40 */ |
| 40 constructor(expandable, refreshCallback, selectedCallback) { | 41 constructor(expandable, refreshCallback, selectedCallback, cookieDomain) { |
|
allada
2016/12/13 01:34:31
Lets rename "expandable" to "readOnly" since that'
| |
| 41 super(); | 42 super(); |
| 42 | 43 |
| 43 var readOnly = expandable; | 44 this._readOnly = expandable; |
| 44 this._refreshCallback = refreshCallback; | 45 this._refreshCallback = refreshCallback; |
| 46 this._cookieDomain = cookieDomain; | |
| 45 | 47 |
| 46 var columns = /** @type {!Array<!UI.DataGrid.ColumnDescriptor>} */ ([ | 48 var columns = /** @type {!Array<!UI.DataGrid.ColumnDescriptor>} */ ([ |
| 47 { | 49 { |
| 48 id: 'name', | 50 id: 'name', |
| 49 title: Common.UIString('Name'), | 51 title: Common.UIString('Name'), |
| 50 sortable: true, | 52 sortable: true, |
| 51 disclosure: expandable, | 53 disclosure: expandable, |
| 52 sort: UI.DataGrid.Order.Ascending, | 54 sort: UI.DataGrid.Order.Ascending, |
| 53 longText: true, | 55 longText: true, |
| 54 weight: 24 | 56 weight: 24, |
| 57 editable: true | |
|
allada
2016/12/13 01:34:30
This should be based on this._readOnly
| |
| 55 }, | 58 }, |
| 56 {id: 'value', title: Common.UIString('Value'), sortable: true, longText: t rue, weight: 34}, | 59 {id: 'value', title: Common.UIString('Value'), sortable: true, longText: t rue, weight: 34, editable: true}, |
| 57 {id: 'domain', title: Common.UIString('Domain'), sortable: true, weight: 7 }, | 60 {id: 'domain', title: Common.UIString('Domain'), sortable: true, weight: 7 , editable: true}, |
| 58 {id: 'path', title: Common.UIString('Path'), sortable: true, weight: 7}, | 61 {id: 'path', title: Common.UIString('Path'), sortable: true, weight: 7, ed itable: true}, |
| 59 {id: 'expires', title: Common.UIString('Expires / Max-Age'), sortable: tru e, weight: 7}, | 62 {id: 'expires', title: Common.UIString('Expires / Max-Age'), sortable: tru e, weight: 7, editable: true}, |
| 60 {id: 'size', title: Common.UIString('Size'), sortable: true, align: UI.Dat aGrid.Align.Right, weight: 7}, | 63 {id: 'size', title: Common.UIString('Size'), sortable: true, align: UI.Dat aGrid.Align.Right, weight: 7}, |
| 61 {id: 'httpOnly', title: Common.UIString('HTTP'), sortable: true, align: UI .DataGrid.Align.Center, weight: 7}, | 64 {id: 'httpOnly', title: Common.UIString('HTTP'), sortable: true, align: UI .DataGrid.Align.Center, weight: 7}, |
| 62 {id: 'secure', title: Common.UIString('Secure'), sortable: true, align: UI .DataGrid.Align.Center, weight: 7}, { | 65 {id: 'secure', title: Common.UIString('Secure'), sortable: true, align: UI .DataGrid.Align.Center, weight: 7}, { |
| 63 id: 'sameSite', | 66 id: 'sameSite', |
| 64 title: Common.UIString('SameSite'), | 67 title: Common.UIString('SameSite'), |
| 65 sortable: true, | 68 sortable: true, |
| 66 align: UI.DataGrid.Align.Center, | 69 align: UI.DataGrid.Align.Center, |
| 67 weight: 7 | 70 weight: 7 |
| 68 } | 71 } |
| 69 ]); | 72 ]); |
| 70 | 73 |
| 71 if (readOnly) { | 74 if (this._readOnly) { |
| 72 this._dataGrid = new UI.DataGrid(columns); | 75 this._dataGrid = new UI.DataGrid(columns); |
| 73 } else { | 76 } else { |
| 74 this._dataGrid = new UI.DataGrid(columns, undefined, this._onDeleteCookie. bind(this), refreshCallback); | 77 this._dataGrid = new UI.DataGrid(columns, this._onUpdateCookie.bind(this), this._onDeleteCookie.bind(this), refreshCallback); |
| 75 this._dataGrid.setRowContextMenuCallback(this._onRowContextMenu.bind(this) ); | 78 this._dataGrid.setRowContextMenuCallback(this._onRowContextMenu.bind(this) ); |
| 76 } | 79 } |
| 77 | 80 |
| 78 this._dataGrid.setName('cookiesTable'); | 81 this._dataGrid.setName('cookiesTable'); |
| 79 this._dataGrid.addEventListener(UI.DataGrid.Events.SortingChanged, this._reb uildTable, this); | 82 this._dataGrid.addEventListener(UI.DataGrid.Events.SortingChanged, this._reb uildTable, this); |
| 80 | 83 |
| 81 if (selectedCallback) | 84 if (selectedCallback) |
| 82 this._dataGrid.addEventListener(UI.DataGrid.Events.SelectedNode, selectedC allback, this); | 85 this._dataGrid.addEventListener(UI.DataGrid.Events.SelectedNode, selectedC allback, this); |
| 83 | 86 |
| 84 this._nextSelectedCookie = /** @type {?SDK.Cookie} */ (null); | 87 this._nextSelectedCookie = /** @type {?SDK.Cookie} */ (null); |
| 88 this._lastEditedColumnId = /** @type {?string} */ (null); | |
|
allada
2016/12/13 01:34:31
nit: Rather than type casting it like his lets dec
kdzwinel
2016/12/14 01:32:36
Makes sense! I wonder why `_nextSelectedCookie` ab
allada
2016/12/14 03:04:15
It tells closure that this variable is a type... T
| |
| 85 | 89 |
| 86 this._dataGrid.asWidget().show(this.element); | 90 this._dataGrid.asWidget().show(this.element); |
| 87 this._data = []; | 91 this._data = []; |
| 88 } | 92 } |
| 89 | 93 |
| 90 /** | 94 /** |
| 91 * @param {?string} domain | 95 * @param {?string} domain |
| 92 */ | 96 */ |
| 93 _clearAndRefresh(domain) { | 97 _clearAndRefresh(domain) { |
| 94 this.clear(domain); | 98 this.clear(domain); |
| 95 this._refresh(); | 99 this._refresh(); |
| 96 } | 100 } |
| 97 | 101 |
| 98 /** | 102 /** |
| 99 * @param {!UI.ContextMenu} contextMenu | 103 * @param {!UI.ContextMenu} contextMenu |
| 100 * @param {!UI.DataGridNode} node | 104 * @param {!UI.DataGridNode} node |
| 101 */ | 105 */ |
| 102 _onRowContextMenu(contextMenu, node) { | 106 _onRowContextMenu(contextMenu, node) { |
| 103 if (node === this._dataGrid.creationNode) | 107 if (node.isCreationNode) |
| 104 return; | 108 return; |
| 105 var domain = node.cookie.domain(); | 109 |
| 110 const cookie = node.cookie; | |
| 111 const checkmark = '\u2713'; | |
| 112 contextMenu.appendCheckboxItem( | |
| 113 Common.UIString('Secure flag'), | |
| 114 this._setCookieFlag.bind(this, node, 'secure', cookie.secure() ? '' : chec kmark), | |
| 115 cookie.secure(), | |
| 116 false | |
| 117 ); | |
| 118 contextMenu.appendCheckboxItem( | |
| 119 Common.UIString('HttpOnly flag'), | |
| 120 this._setCookieFlag.bind(this, node, 'httpOnly', cookie.httpOnly() ? '' : checkmark), | |
| 121 cookie.httpOnly(), | |
| 122 false | |
| 123 ); | |
| 124 | |
| 125 var sameSiteSubmenu = contextMenu.appendSubMenuItem(Common.UIString('SameSit e flag')); | |
| 126 sameSiteSubmenu.appendCheckboxItem( | |
|
allada
2016/12/13 01:34:31
Lets remove this as a checkbox item and just make
allada
2016/12/14 03:04:15
Lets move it back to checkbox... I misread the hie
| |
| 127 Common.UIString('<empty>'), | |
| 128 this._setCookieFlag.bind(this, node, 'sameSite', ''), | |
| 129 !cookie.sameSite(), | |
| 130 false | |
| 131 ); | |
| 132 sameSiteSubmenu.appendCheckboxItem( | |
| 133 Protocol.Network.CookieSameSite.Lax, | |
| 134 this._setCookieFlag.bind(this, node, 'sameSite', Protocol.Network.CookieSa meSite.Lax), | |
| 135 cookie.sameSite() === Protocol.Network.CookieSameSite.Lax, | |
| 136 false | |
| 137 ); | |
| 138 sameSiteSubmenu.appendCheckboxItem( | |
|
allada
2016/12/13 01:34:31
We should add one more called something like "No R
kdzwinel
2016/12/14 01:32:36
Isn't that the same I called '<empty>' above? (I'l
allada
2016/12/14 03:04:15
Yes, I see.
| |
| 139 Protocol.Network.CookieSameSite.Strict, | |
| 140 this._setCookieFlag.bind(this, node, 'sameSite', Protocol.Network.CookieSa meSite.Strict), | |
| 141 cookie.sameSite() === Protocol.Network.CookieSameSite.Strict, | |
| 142 false | |
| 143 ); | |
| 144 contextMenu.appendSeparator(); | |
| 145 | |
| 146 var domain = cookie.domain(); | |
| 106 if (domain) { | 147 if (domain) { |
| 107 contextMenu.appendItem( | 148 contextMenu.appendItem( |
| 108 Common.UIString.capitalize('Clear ^all from "%s"', domain), this._clea rAndRefresh.bind(this, domain)); | 149 Common.UIString.capitalize('Clear ^all from "%s"', domain), this._clea rAndRefresh.bind(this, domain)); |
| 109 } | 150 } |
| 110 contextMenu.appendItem(Common.UIString.capitalize('Clear ^all'), this._clear AndRefresh.bind(this, null)); | 151 contextMenu.appendItem(Common.UIString.capitalize('Clear ^all'), this._clear AndRefresh.bind(this, null)); |
| 111 } | 152 } |
| 112 | 153 |
| 154 _setCookieFlag(node, flag, value) { | |
| 155 node.data[flag] = value; | |
| 156 node.refresh(); | |
| 157 this._saveNode(node); | |
| 158 } | |
| 159 | |
| 113 /** | 160 /** |
| 114 * @param {!Array.<!SDK.Cookie>} cookies | 161 * @param {!Array.<!SDK.Cookie>} cookies |
| 115 */ | 162 */ |
| 116 setCookies(cookies) { | 163 setCookies(cookies) { |
| 117 this.setCookieFolders([{cookies: cookies}]); | 164 this.setCookieFolders([{cookies: cookies}]); |
| 118 } | 165 } |
| 119 | 166 |
| 120 /** | 167 /** |
| 121 * @param {!Array.<!{folderName: ?string, cookies: !Array.<!SDK.Cookie>}>} coo kieFolders | 168 * @param {!Array.<!{folderName: ?string, cookies: !Array.<!SDK.Cookie>}>} coo kieFolders |
| 122 */ | 169 */ |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 139 clear(domain) { | 186 clear(domain) { |
| 140 for (var i = 0, length = this._data.length; i < length; ++i) { | 187 for (var i = 0, length = this._data.length; i < length; ++i) { |
| 141 var cookies = this._data[i].cookies; | 188 var cookies = this._data[i].cookies; |
| 142 for (var j = 0, cookieCount = cookies.length; j < cookieCount; ++j) { | 189 for (var j = 0, cookieCount = cookies.length; j < cookieCount; ++j) { |
| 143 if (!domain || cookies[j].domain() === domain) | 190 if (!domain || cookies[j].domain() === domain) |
| 144 cookies[j].remove(); | 191 cookies[j].remove(); |
| 145 } | 192 } |
| 146 } | 193 } |
| 147 } | 194 } |
| 148 | 195 |
| 196 /** | |
| 197 * @override | |
| 198 */ | |
| 199 willHide() { | |
| 200 this._lastEditedColumnId = null; | |
| 201 } | |
| 202 | |
| 149 _rebuildTable() { | 203 _rebuildTable() { |
| 150 var selectedCookie = this._nextSelectedCookie || this.selectedCookie(); | 204 var selectedCookie = this._nextSelectedCookie || this.selectedCookie(); |
| 205 var lastEditedColumnId = this._lastEditedColumnId; | |
| 151 this._nextSelectedCookie = null; | 206 this._nextSelectedCookie = null; |
| 207 this._lastEditedColumnId = null; | |
| 152 this._dataGrid.rootNode().removeChildren(); | 208 this._dataGrid.rootNode().removeChildren(); |
| 153 for (var i = 0; i < this._data.length; ++i) { | 209 for (var i = 0; i < this._data.length; ++i) { |
| 154 var item = this._data[i]; | 210 var item = this._data[i]; |
| 155 if (item.folderName) { | 211 if (item.folderName) { |
| 156 var groupData = { | 212 var groupData = { |
| 157 name: item.folderName, | 213 name: item.folderName, |
| 158 value: '', | 214 value: '', |
| 159 domain: '', | 215 domain: '', |
| 160 path: '', | 216 path: '', |
| 161 expires: '', | 217 expires: '', |
| 162 size: this._totalSize(item.cookies), | 218 size: this._totalSize(item.cookies), |
| 163 httpOnly: '', | 219 httpOnly: '', |
| 164 secure: '', | 220 secure: '', |
| 165 sameSite: '' | 221 sameSite: '' |
| 166 }; | 222 }; |
| 167 var groupNode = new UI.DataGridNode(groupData); | 223 var groupNode = new UI.DataGridNode(groupData); |
| 168 groupNode.selectable = true; | 224 groupNode.selectable = true; |
| 169 this._dataGrid.rootNode().appendChild(groupNode); | 225 this._dataGrid.rootNode().appendChild(groupNode); |
| 170 groupNode.element().classList.add('row-group'); | 226 groupNode.element().classList.add('row-group'); |
| 171 this._populateNode(groupNode, item.cookies, selectedCookie); | 227 this._populateNode(groupNode, item.cookies, selectedCookie, lastEditedCo lumnId); |
| 172 groupNode.expand(); | 228 groupNode.expand(); |
| 173 } else { | 229 } else { |
| 174 this._populateNode(this._dataGrid.rootNode(), item.cookies, selectedCook ie); | 230 this._populateNode(this._dataGrid.rootNode(), item.cookies, selectedCook ie, lastEditedColumnId); |
| 175 } | 231 } |
| 176 } | 232 } |
| 233 if (!this._readOnly) | |
| 234 this._dataGrid.addCreationNode(false); | |
| 177 } | 235 } |
| 178 | 236 |
| 179 /** | 237 /** |
| 180 * @param {!UI.DataGridNode} parentNode | 238 * @param {!UI.DataGridNode} parentNode |
| 181 * @param {?Array.<!SDK.Cookie>} cookies | 239 * @param {?Array.<!SDK.Cookie>} cookies |
| 182 * @param {?SDK.Cookie} selectedCookie | 240 * @param {?SDK.Cookie} selectedCookie |
| 241 * @param {?string} lastEditedColumnId | |
| 183 */ | 242 */ |
| 184 _populateNode(parentNode, cookies, selectedCookie) { | 243 _populateNode(parentNode, cookies, selectedCookie, lastEditedColumnId) { |
| 185 parentNode.removeChildren(); | 244 parentNode.removeChildren(); |
| 186 if (!cookies) | 245 if (!cookies) |
| 187 return; | 246 return; |
| 188 | 247 |
| 189 this._sortCookies(cookies); | 248 this._sortCookies(cookies); |
| 190 for (var i = 0; i < cookies.length; ++i) { | 249 for (var i = 0; i < cookies.length; ++i) { |
| 191 var cookie = cookies[i]; | 250 var cookie = cookies[i]; |
| 192 var cookieNode = this._createGridNode(cookie); | 251 var cookieNode = this._createGridNode(cookie); |
| 193 parentNode.appendChild(cookieNode); | 252 parentNode.appendChild(cookieNode); |
| 194 if (selectedCookie && selectedCookie.name() === cookie.name() && selectedC ookie.domain() === cookie.domain() && | 253 if (selectedCookie && selectedCookie.name() === cookie.name() && selectedC ookie.domain() === cookie.domain() && |
| 195 selectedCookie.path() === cookie.path()) | 254 selectedCookie.path() === cookie.path()) { |
| 196 cookieNode.select(); | 255 cookieNode.select(); |
| 256 if (lastEditedColumnId !== null) | |
| 257 this._dataGrid.startEditingNextEditableColumnOfDataGridNode(cookieNode , lastEditedColumnId); | |
| 258 } | |
| 197 } | 259 } |
| 198 } | 260 } |
| 199 | 261 |
| 200 _totalSize(cookies) { | 262 _totalSize(cookies) { |
| 201 var totalSize = 0; | 263 var totalSize = 0; |
| 202 for (var i = 0; cookies && i < cookies.length; ++i) | 264 for (var i = 0; cookies && i < cookies.length; ++i) |
| 203 totalSize += cookies[i].size(); | 265 totalSize += cookies[i].size(); |
| 204 return totalSize; | 266 return totalSize; |
| 205 } | 267 } |
| 206 | 268 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 | 363 |
| 302 _onDeleteCookie(node) { | 364 _onDeleteCookie(node) { |
| 303 var cookie = node.cookie; | 365 var cookie = node.cookie; |
| 304 var neighbour = node.traverseNextNode() || node.traversePreviousNode(); | 366 var neighbour = node.traverseNextNode() || node.traversePreviousNode(); |
| 305 if (neighbour) | 367 if (neighbour) |
| 306 this._nextSelectedCookie = neighbour.cookie; | 368 this._nextSelectedCookie = neighbour.cookie; |
| 307 cookie.remove(); | 369 cookie.remove(); |
| 308 this._refresh(); | 370 this._refresh(); |
| 309 } | 371 } |
| 310 | 372 |
| 373 _onUpdateCookie(editingNode, columnIdentifier, oldText, newText) { | |
|
allada
2016/12/13 01:34:31
nit: doctype please.
kdzwinel
2016/12/14 01:32:36
Sure! I can't figure out the pattern here though.
allada
2016/12/14 03:04:15
It's because old code was not doctyped. We are try
| |
| 374 this._lastEditedColumnId = columnIdentifier; | |
| 375 this._setDefaults(editingNode); | |
| 376 if (this._isValidCookieData(editingNode.data)) | |
| 377 this._saveNode(editingNode); | |
| 378 else | |
| 379 editingNode.unsaved = true; | |
| 380 } | |
| 381 | |
| 382 _setDefaults(node) { | |
|
allada
2016/12/13 01:34:30
nit: doctype please.
| |
| 383 if (node.data.name === null) | |
| 384 node.data.name = ''; | |
| 385 if (node.data.value === null) | |
| 386 node.data.value = ''; | |
| 387 if (node.data.domain === null) | |
| 388 node.data.domain = this._cookieDomain; | |
| 389 if (node.data.path === null) | |
| 390 node.data.path = '/'; | |
| 391 if (node.data.expires === null) | |
| 392 node.data.expires = Common.UIString('Session'); | |
| 393 } | |
| 394 | |
| 395 _saveNode(node) { | |
|
allada
2016/12/13 01:34:31
nit: doctype please.
| |
| 396 var oldCookie = node.cookie; | |
| 397 var newCookie = this._createCookieFromData(node.data); | |
| 398 if (oldCookie && (newCookie.name() !== oldCookie.name() || newCookie.url() ! == oldCookie.url())) oldCookie.remove(); | |
|
allada
2016/12/13 01:34:30
nit: oldCookie.remove() should be on a new line.
| |
| 399 node.cookie = newCookie; | |
| 400 newCookie.save((error, success) => { | |
| 401 if (success) | |
| 402 this._refresh(); | |
| 403 else | |
| 404 node.unsaved = true; | |
| 405 }); | |
| 406 this._nextSelectedCookie = newCookie; | |
| 407 } | |
| 408 | |
| 409 _createCookieFromData(data) { | |
|
allada
2016/12/13 01:34:31
nit: doctype please.
| |
| 410 var target = SDK.targetManager.targets(SDK.Target.Capability.Network)[0]; | |
|
allada
2016/12/13 01:34:30
We don't want to use targetManager here we want to
kdzwinel
2016/12/14 01:32:36
So instead of getting a first target from targetMa
allada
2016/12/14 03:04:15
I mean, we should add a new function/method in mul
kdzwinel
2016/12/14 14:26:50
Sorry, I still do not follow :/ `clearBrowserCooki
| |
| 411 var cookie = new SDK.Cookie(target, data.name, data.value, null); | |
| 412 cookie.addAttribute('domain', data.domain); | |
| 413 cookie.addAttribute('path', data.path); | |
| 414 if (data.expires && data.expires !== Common.UIString('Session')) { | |
| 415 var secondsSinceEpoch = Date.parse(data.expires) / 1000; | |
|
allada
2016/12/13 01:34:31
nit: we should floor this.
| |
| 416 cookie.addAttribute('expires', secondsSinceEpoch || undefined); | |
| 417 } | |
| 418 if (data.httpOnly) | |
| 419 cookie.addAttribute('httpOnly'); | |
| 420 if (data.secure) | |
| 421 cookie.addAttribute('secure'); | |
| 422 if (data.sameSite) | |
| 423 cookie.addAttribute('sameSite', data.sameSite); | |
| 424 cookie.setSize(data.name.length + data.value.length); | |
| 425 return cookie; | |
| 426 } | |
| 427 | |
| 428 _isValidCookieData(data) { | |
|
allada
2016/12/13 01:34:31
nit: doctype please.
| |
| 429 return (data.name || data.value) && this._isValidDomain(data.domain) && this ._isValidPath(data.path) && this._isValidDate(data.expires); | |
| 430 } | |
| 431 | |
| 432 _isValidDomain(domain) { | |
|
allada
2016/12/13 01:34:31
nit: doctype please.
| |
| 433 if (domain === '') | |
|
allada
2016/12/13 01:34:30
nit: We prefer if (!domain)
| |
| 434 return true; | |
| 435 var url = null; | |
|
allada
2016/12/13 01:34:31
nit: Lets move the definition down into the try ca
| |
| 436 try { | |
| 437 url = new URL('http://' + domain); | |
|
allada
2016/12/13 01:34:30
Lets use ParsedURL instead. We should be able to g
| |
| 438 } catch (e) { | |
| 439 return false; | |
| 440 } | |
| 441 return url.hostname === domain; | |
| 442 } | |
| 443 | |
| 444 _isValidPath(path) { | |
|
allada
2016/12/13 01:34:31
nit: doctype please.
| |
| 445 var url = null; | |
|
allada
2016/12/13 01:34:30
nit: diddo from above.
| |
| 446 try { | |
| 447 url = new URL('http://example.com' + path); | |
|
allada
2016/12/13 01:34:31
see above.
| |
| 448 } catch (e) { | |
| 449 return false; | |
| 450 } | |
| 451 return url.pathname === path; | |
| 452 } | |
| 453 | |
| 454 _isValidDate(date) { | |
|
allada
2016/12/13 01:34:30
nit: doctype please.
| |
| 455 return date === '' || date === Common.UIString('Session') || !isNaN(Date.par se(date)); | |
| 456 } | |
| 457 | |
| 311 _refresh() { | 458 _refresh() { |
| 312 if (this._refreshCallback) | 459 if (this._refreshCallback) |
| 313 this._refreshCallback(); | 460 this._refreshCallback(); |
| 314 } | 461 } |
| 315 }; | 462 }; |
| OLD | NEW |