| Index: ui/file_manager/file_manager/background/js/media_scanner.js
|
| diff --git a/ui/file_manager/file_manager/background/js/media_scanner.js b/ui/file_manager/file_manager/background/js/media_scanner.js
|
| index 7c744b2e214768e5bcc90d94c3b31f1c1f8f2c6b..3b67d83727f7e48c6a5b9d3a7a4580ab6841bc51 100644
|
| --- a/ui/file_manager/file_manager/background/js/media_scanner.js
|
| +++ b/ui/file_manager/file_manager/background/js/media_scanner.js
|
| @@ -6,21 +6,18 @@
|
| * Recursively scans through a list of given files and directories, and creates
|
| * a list of media files.
|
| *
|
| - * @param {!Array.<!Entry>} entries A list of file and directory entries. File
|
| - * entries are added directly to the media list; directory entries are
|
| - * recursively traversed to find files, which are added to the media list.
|
| * @constructor
|
| */
|
| -function MediaScanner(entries) {
|
| - /** @private {!Promise<!Array<!FileEntry>>} */
|
| - this.filesPromise_ = this.scan_(entries);
|
| -}
|
| +function MediaScanner() {}
|
|
|
| /**
|
| * Scans a list of directory and file entries, returning image and video files.
|
| - * @param {!Array<!Entry>} entries
|
| + * @param {!Array<!Entry>} entries A list of file and directory entries. File
|
| + * entries are added directly to the media list; directory entries are
|
| + * recursively traversed to find files, which are added to the media list.
|
| + * @return {!Promise<!Array<!FileEntry>>}
|
| */
|
| -MediaScanner.prototype.scan_ = function(entries) {
|
| +MediaScanner.prototype.scan = function(entries) {
|
| /**
|
| * Returns files and directories found under the given Entry.
|
| * @param {!Entry} entry
|
| @@ -46,7 +43,7 @@ MediaScanner.prototype.scan_ = function(entries) {
|
| /**
|
| * Filters non-image and non-video files out of the given list.
|
| * @param {!Array<!Entry>} array
|
| - * @return {!Array<!Entry>}
|
| + * @return {!Array<!FileEntry>}
|
| */
|
| var filter = function(array) {
|
| return array.filter(FileType.isImageOrVideo);
|
| @@ -56,10 +53,3 @@ MediaScanner.prototype.scan_ = function(entries) {
|
| .then(flatten)
|
| .then(filter);
|
| };
|
| -
|
| -/**
|
| - * @return {!Promise<!Array<!FileEntry>>}
|
| - */
|
| -MediaScanner.prototype.getFiles = function() {
|
| - return this.filesPromise_;
|
| -};
|
|
|