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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js

Issue 2444223002: [Devtools] Cleanup DataGrid's typecast and identifier naming (Closed)
Patch Set: changes Created 4 years, 2 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/components_lazy/CookiesTable.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js b/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js
index cf3396e4643e88c259bb93f1c7c8c3f09d126f1b..01fbd9899539405c5d4ea92631ab8ca8e7741423 100644
--- a/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js
+++ b/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js
@@ -42,7 +42,7 @@ WebInspector.CookiesTable = function(expandable, refreshCallback, selectedCallba
var readOnly = expandable;
this._refreshCallback = refreshCallback;
- var columns = [
+ var columns = /** @type {!Array<!WebInspector.DataGrid.ColumnDescriptor>} */ ([
{id: "name", title: WebInspector.UIString("Name"), sortable: true, disclosure: expandable, sort: WebInspector.DataGrid.Order.Ascending, longText: true, weight: 24},
{id: "value", title: WebInspector.UIString("Value"), sortable: true, longText: true, weight: 34},
{id: "domain", title: WebInspector.UIString("Domain"), sortable: true, weight: 7},
@@ -52,7 +52,7 @@ WebInspector.CookiesTable = function(expandable, refreshCallback, selectedCallba
{id: "httpOnly", title: WebInspector.UIString("HTTP"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7},
{id: "secure", title: WebInspector.UIString("Secure"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7},
{id: "sameSite", title: WebInspector.UIString("SameSite"), sortable: true, align: WebInspector.DataGrid.Align.Center, weight: 7}
- ];
+ ]);
if (readOnly)
this._dataGrid = new WebInspector.DataGrid(columns);
@@ -218,7 +218,7 @@ WebInspector.CookiesTable.prototype = {
}
var comparator;
- switch (this._dataGrid.sortColumnIdentifier()) {
+ switch (this._dataGrid.sortColumnId()) {
case "name": comparator = compareTo.bind(null, WebInspector.Cookie.prototype.name); break;
case "value": comparator = compareTo.bind(null, WebInspector.Cookie.prototype.value); break;
case "domain": comparator = compareTo.bind(null, WebInspector.Cookie.prototype.domain); break;

Powered by Google App Engine
This is Rietveld 408576698