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

Side by Side Diff: Source/devtools/front_end/resources/DirectoryContentView.js

Issue 340513003: DevTools: Add JSDoc for static methods, fix JSDoc types and induced errors (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 WebInspector.DataGridNode.call(this, data); 94 WebInspector.DataGridNode.call(this, data);
95 this._entry = entry; 95 this._entry = entry;
96 this._metadata = null; 96 this._metadata = null;
97 97
98 this._entry.requestMetadata(this._metadataReceived.bind(this)); 98 this._entry.requestMetadata(this._metadataReceived.bind(this));
99 } 99 }
100 100
101 /** 101 /**
102 * @param {string} column 102 * @param {string} column
103 * @param {boolean} reverse 103 * @param {boolean} reverse
104 * @return {function(*, *):number|undefined}
aandrey 2014/06/17 11:33:54 why * instead of types?
apavlov 2014/06/17 12:46:03 Done.
104 */ 105 */
105 WebInspector.DirectoryContentView.Node.comparator = function(column, reverse) 106 WebInspector.DirectoryContentView.Node.comparator = function(column, reverse)
106 { 107 {
107 var reverseFactor = reverse ? -1 : 1; 108 var reverseFactor = reverse ? -1 : 1;
108 const indexes = WebInspector.DirectoryContentView.columnIndexes; 109 const indexes = WebInspector.DirectoryContentView.columnIndexes;
109 110
110 switch (column) { 111 switch (column) {
111 case indexes.Name: 112 case indexes.Name:
112 case indexes.URL: 113 case indexes.URL:
113 return function(x, y) 114 return function(x, y)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 if (this._entry.isDirectory) 176 if (this._entry.isDirectory)
176 data[indexes.Size] = WebInspector.UIString("-"); 177 data[indexes.Size] = WebInspector.UIString("-");
177 else 178 else
178 data[indexes.Size] = Number.bytesToString(metadata.size); 179 data[indexes.Size] = Number.bytesToString(metadata.size);
179 data[indexes.ModificationTime] = new Date(metadata.modificationTime).toI SOString(); 180 data[indexes.ModificationTime] = new Date(metadata.modificationTime).toI SOString();
180 this.data = data; 181 this.data = data;
181 }, 182 },
182 183
183 __proto__: WebInspector.DataGridNode.prototype 184 __proto__: WebInspector.DataGridNode.prototype
184 } 185 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698