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

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

Issue 971723002: Files.app: Rename FileSystemMetadata with MetadataModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/foreground/js/metadata_update_controller.js
diff --git a/ui/file_manager/file_manager/foreground/js/metadata_update_controller.js b/ui/file_manager/file_manager/foreground/js/metadata_update_controller.js
index 15f344eb4923162ed00c1c983ec8361ad3bbc822..08b346566c614fa1fe5a496eadb738ffaebb3f86 100644
--- a/ui/file_manager/file_manager/foreground/js/metadata_update_controller.js
+++ b/ui/file_manager/file_manager/foreground/js/metadata_update_controller.js
@@ -6,13 +6,13 @@
* Controller for list contents update.
* @param {!ListContainer} listContainer
* @param {!DirectoryModel} directoryModel
- * @param {!FileSystemMetadata} fileSystemMetadata
+ * @param {!MetadataModel} metadataModel
* @constructor
* @struct
*/
function MetadataUpdateController(listContainer,
directoryModel,
- fileSystemMetadata) {
+ metadataModel) {
/**
* @private {!DirectoryModel}
* @const
@@ -20,10 +20,10 @@ function MetadataUpdateController(listContainer,
this.directoryModel_ = directoryModel;
/**
- * @private {!FileSystemMetadata}
+ * @private {!MetadataModel}
* @const
*/
- this.fileSystemMetadata_ = fileSystemMetadata;
+ this.metadataModel_ = metadataModel;
/**
* @private {!ListContainer}
@@ -34,7 +34,7 @@ function MetadataUpdateController(listContainer,
chrome.fileManagerPrivate.onPreferencesChanged.addListener(
this.onPreferencesChanged_.bind(this));
this.onPreferencesChanged_();
- fileSystemMetadata.addEventListener(
+ metadataModel.addEventListener(
'update', this.onCachedMetadataUpdate_.bind(this));
// Update metadata to change 'Today' and 'Yesterday' dates.
@@ -68,11 +68,11 @@ MetadataUpdateController.prototype.refreshCurrentDirectoryMetadata =
// changed.
var isFakeEntry = util.isFakeEntry(directoryEntry);
var changedEntries = (isFakeEntry ? [] : [directoryEntry]).concat(entries);
- this.fileSystemMetadata_.notifyEntriesChanged(changedEntries);
+ this.metadataModel_.notifyEntriesChanged(changedEntries);
// We don't pass callback here. When new metadata arrives, we have an
// observer registered to update the UI.
- this.fileSystemMetadata_.get(
+ this.metadataModel_.get(
changedEntries, this.directoryModel_.getPrefetchPropertyNames());
};
@@ -95,7 +95,7 @@ MetadataUpdateController.prototype.onCachedMetadataUpdate_ = function(event) {
MetadataUpdateController.prototype.dailyUpdateModificationTime_ = function() {
var entries = /** @type {!Array<!Entry>} */(
this.directoryModel_.getFileList().slice());
- this.fileSystemMetadata_.get(entries, ['modificationTime']).then(function() {
+ this.metadataModel_.get(entries, ['modificationTime']).then(function() {
this.listContainer_.currentView.updateListItemsMetadata(
'filesystem', entries);
}.bind(this));

Powered by Google App Engine
This is Rietveld 408576698