| Index: ui/file_manager/file_manager/foreground/js/file_selection.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/file_selection.js b/ui/file_manager/file_manager/foreground/js/file_selection.js
|
| index 1ee0e3386ac2ee99cc55ea4878e1be74a0fdb656..fa7a0529a9dbbf88c8f845c1d62835e6a748c450 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/file_selection.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/file_selection.js
|
| @@ -77,35 +77,27 @@ function FileSelection(indexes, entries) {
|
|
|
| FileSelection.prototype.computeAdditional = function(metadataModel) {
|
| if (!this.additionalPromise_) {
|
| - this.additionalPromise_ = metadataModel.get(
|
| - this.entries,
|
| - FileSelection.METADATA_PREFETCH_PROPERTY_NAMES)
|
| - .then(function(props) {
|
| - var present = props.filter(function(p) {
|
| - // If no availableOffline property, then assume it's available.
|
| - return !('availableOffline' in p) || p.availableOffline;
|
| - });
|
| - this.allFilesPresent = present.length === props.length;
|
| - this.mimeTypes = props.map(function(value) {
|
| - return value.contentMimeType || '';
|
| - });
|
| - return true;
|
| - }.bind(this));
|
| + this.additionalPromise_ =
|
| + metadataModel
|
| + .get(
|
| + this.entries,
|
| + constants.FILE_SELECTION_METADATA_PREFETCH_PROPERTY_NAMES)
|
| + .then(function(props) {
|
| + var present = props.filter(function(p) {
|
| + // If no availableOffline property, then assume it's available.
|
| + return !('availableOffline' in p) || p.availableOffline;
|
| + });
|
| + this.allFilesPresent = present.length === props.length;
|
| + this.mimeTypes = props.map(function(value) {
|
| + return value.contentMimeType || '';
|
| + });
|
| + return true;
|
| + }.bind(this));
|
| }
|
| return this.additionalPromise_;
|
| };
|
|
|
| /**
|
| - * These metadata is expected to be cached to accelerate computeAdditional.
|
| - * See: crbug.com/458915.
|
| - * @const {!Array<string>}
|
| - */
|
| -FileSelection.METADATA_PREFETCH_PROPERTY_NAMES = [
|
| - 'availableOffline',
|
| - 'contentMimeType',
|
| -];
|
| -
|
| -/**
|
| * This object encapsulates everything related to current selection.
|
| *
|
| * @param {!FileManager} fileManager File manager instance.
|
|
|