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

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

Issue 892083004: Files.app: Use new metadata models in DirectoryModel. (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/file_manager.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js
index b9290b81257a7b25cdaa52a4ba193010daef6523..30a6a303acb60317e087afedf36b56234b0c9a57 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
@@ -61,6 +61,17 @@ function FileManager() {
this.metadataCache_ = null;
/**
+ * @private {!MetadataProviderCache}
+ * @const
+ */
+ this.metadataProviderCache_ = new MetadataProviderCache();
+
+ /**
+ * @private {FileSystemMetadata}
+ */
+ this.fileSystemMetadata_ = null;
+
+ /**
* File operation manager.
* @type {FileOperationManager}
* @private
@@ -680,7 +691,13 @@ FileManager.prototype = /** @struct */ {
DialogType.FULL_PAGE]);
// Create the metadata cache.
+ assert(this.volumeManager_);
this.metadataCache_ = MetadataCache.createFull(this.volumeManager_);
+ this.fileSystemMetadata_ = new FileSystemMetadata(
+ this.metadataProviderCache_,
+ new FileSystemMetadataProvider(this.metadataProviderCache_),
+ new ExternalMetadataProvider(this.metadataProviderCache_),
+ this.volumeManager_);
// Create the root view of FileManager.
assert(this.dialogDom_);
@@ -832,11 +849,13 @@ FileManager.prototype = /** @struct */ {
assert(this.volumeManager_);
assert(this.fileOperationManager_);
+ assert(this.fileSystemMetadata_);
this.directoryModel_ = new DirectoryModel(
singleSelection,
this.fileFilter_,
this.fileWatcher_,
this.metadataCache_,
+ this.fileSystemMetadata_,
this.volumeManager_,
this.fileOperationManager_);

Powered by Google App Engine
This is Rietveld 408576698