[Files app] Convert directory_tree.js to ES6 class
Converted with lebab: $ lebab --replace tree.js --transform class Then manually: 1. Move @extends {cr.ui.TreeItem} to actual ES6 extends. 2. call super() in the ctor. 3. Move Closure markup from class to its ctor. 4. Remove return from ctor. 5. Rename item.* to this.* in ctor. 6. Check FunctionName.prototype = { __proto__: ... } move getters/ setters to class body, removing trailing commas. 7. Fix closure errors, mostly declaring attributes in the ctor. 8. Run clang format in the file, because lebab format style is very different. $ buildtools/linux64/clang-format -i \ ui/file_manager/file_manager/foreground/js/ui/directory_tree.js Test: No change in behavior, so current tests already covers it. Bug: 778674 Change-Id: I2f11ea6d85ef9546fc3b54e5b0a5e187e8b3e90b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1539479 Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Reviewed-by:Alex Danilo <adanilo@chromium.org> Cr-Commit-Position: refs/heads/master@{#644689}
Showing
This source diff could not be displayed because it is too large. You can view the blob instead.
Please register or sign in to comment