Changed Downloads translations when MyFilesVolumes is enabled
Change util.getEntryLabel to special case Downloads folder to translate. Change DirectoryTree and FileList to use util.getEntryLabel for translating the entry labels and util.compareLabel for sorting the entries. Change FileList related types to carry volume manager to be able to pass LocationInfo to be able to use getEntryLabel for displaying and sorting entries on File List, as follows: - Add VolumeManager to FileListContext constructor, since this type is constructed only once. - Change DirectoryContents constructor to forward VolumeManager from FileListContext to FileListModel. - FileListModel uses VolumeManager to get LocationInfo to sort entries by labels. Add Closure markup for DirectoryContents attributes related to this change to add clarity for developers and stronger type in Closure. As part of this changed DirectoryContents.fileList_ to be always FileListModel instead of switching to a empty ArrayDataModel from |setFileList|. Test will come in follow up CL. :-) Bug: 873539 Change-Id: I46dd1879c14cbf046f5da5d96c29b34f13d404a1 Reviewed-on: https://chromium-review.googlesource.com/c/1370151 Commit-Queue: Luciano Pacheco <lucmult@chromium.org> Reviewed-by:Noel Gordon <noel@chromium.org> Cr-Commit-Position: refs/heads/master@{#615425}
Showing
Please register or sign in to comment