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

Unified Diff: ui/file_manager/file_manager/foreground/js/file_selection.js

Issue 2822633004: Compile more targets in file_manager in gyp v2. (Closed)
Patch Set: git cl format --js Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698