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

Side by Side Diff: ui/file_manager/file_manager/foreground/js/directory_contents.js

Issue 934683004: Fix closure compiler errors which are introduced by 931603002. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Scanner of the entries. 6 * Scanner of the entries.
7 * @constructor 7 * @constructor
8 */ 8 */
9 function ContentScanner() { 9 function ContentScanner() {
10 this.cancelled_ = false; 10 this.cancelled_ = false;
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 this.fileList_ = new cr.ui.ArrayDataModel(fileList); 679 this.fileList_ = new cr.ui.ArrayDataModel(fileList);
680 this.makeSpaceInMetadataCache_(this.fileList_.length); 680 this.makeSpaceInMetadataCache_(this.fileList_.length);
681 }; 681 };
682 682
683 /** 683 /**
684 * Creates snapshot of metadata in the directory. 684 * Creates snapshot of metadata in the directory.
685 * @return {!Object} Metadata snapshot of current directory contents. 685 * @return {!Object} Metadata snapshot of current directory contents.
686 */ 686 */
687 DirectoryContents.prototype.createMetadataSnapshot = function() { 687 DirectoryContents.prototype.createMetadataSnapshot = function() {
688 var snapshot = {}; 688 var snapshot = {};
689 var entries = this.fileList_.slice(); 689 var entries = /** @type {!Array<!Entry>} */ (this.fileList_.slice());
690 var metadata = this.context_.fileSystemMetadata.getCache( 690 var metadata = this.context_.fileSystemMetadata.getCache(
691 entries, ['modificationTime']); 691 entries, ['modificationTime']);
692 for (var i = 0; i < entries.length; i++) { 692 for (var i = 0; i < entries.length; i++) {
693 snapshot[entries[i].toURL()] = metadata[i]; 693 snapshot[entries[i].toURL()] = metadata[i];
694 } 694 }
695 return snapshot; 695 return snapshot;
696 } 696 }
697 697
698 /** 698 /**
699 * Sets metadata snapshot which is used to check changed files. 699 * Sets metadata snapshot which is used to check changed files.
(...skipping 17 matching lines...) Expand all
717 var spliceArgs = this.fileList_.slice(); 717 var spliceArgs = this.fileList_.slice();
718 var fileList = this.context_.fileList; 718 var fileList = this.context_.fileList;
719 spliceArgs.unshift(0, fileList.length); 719 spliceArgs.unshift(0, fileList.length);
720 fileList.splice.apply(fileList, spliceArgs); 720 fileList.splice.apply(fileList, spliceArgs);
721 this.fileList_ = fileList; 721 this.fileList_ = fileList;
722 this.makeSpaceInMetadataCache_(this.fileList_.length); 722 this.makeSpaceInMetadataCache_(this.fileList_.length);
723 723
724 // Check updated files and dispatch change events. 724 // Check updated files and dispatch change events.
725 if (this.metadataSnapshot_) { 725 if (this.metadataSnapshot_) {
726 var updatedIndexes = []; 726 var updatedIndexes = [];
727 var entries = this.fileList_.slice(); 727 var entries = /** @type {!Array<!Entry>} */ (this.fileList_.slice());
728 var newMetadatas = this.context_.fileSystemMetadata.getCache( 728 var newMetadatas = this.context_.fileSystemMetadata.getCache(
729 entries, ['modificationTime']); 729 entries, ['modificationTime']);
730 730
731 for (var i = 0; i < entries.length; i++) { 731 for (var i = 0; i < entries.length; i++) {
732 var url = entries[i].toURL(); 732 var url = entries[i].toURL();
733 var newMetadata = newMetadatas[i]; 733 var newMetadata = newMetadatas[i];
734 if (this.metadataSnapshot_[url] && 734 if (this.metadataSnapshot_[url] &&
735 this.metadataSnapshot_[url].modificationTime && 735 this.metadataSnapshot_[url].modificationTime &&
736 this.metadataSnapshot_[url].modificationTime.getTime() !== 736 this.metadataSnapshot_[url].modificationTime.getTime() !==
737 newMetadata.modificationTime.getTime()) 737 newMetadata.modificationTime.getTime())
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1099 DirectoryContents.createForDriveMetadataSearch = function( 1099 DirectoryContents.createForDriveMetadataSearch = function(
1100 context, fakeDirectoryEntry, searchType) { 1100 context, fakeDirectoryEntry, searchType) {
1101 return new DirectoryContents( 1101 return new DirectoryContents(
1102 context, 1102 context,
1103 true, // Search 1103 true, // Search
1104 fakeDirectoryEntry, 1104 fakeDirectoryEntry,
1105 function() { 1105 function() {
1106 return new DriveMetadataSearchContentScanner(searchType); 1106 return new DriveMetadataSearchContentScanner(searchType);
1107 }); 1107 });
1108 }; 1108 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698