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

Unified Diff: ui/file_manager/gallery/js/gallery_data_model.js

Issue 944163004: Files.app: Add new metadata model to Gallery.app. (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
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/gallery/js/gallery_data_model_unittest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/gallery_data_model.js
diff --git a/ui/file_manager/gallery/js/gallery_data_model.js b/ui/file_manager/gallery/js/gallery_data_model.js
index 45afe8d9bd44e169d6fa4428ebc5e4bc1fb10ce3..5b80f772455fd22789f4b91c4b964e6d31e8e0da 100644
--- a/ui/file_manager/gallery/js/gallery_data_model.js
+++ b/ui/file_manager/gallery/js/gallery_data_model.js
@@ -6,24 +6,32 @@
* Data model for gallery.
*
* @param {!MetadataCache} metadataCache Metadata cache.
+ * @param {!FileSystemMetadata} fileSystemMetadata
* @param {!EntryListWatcher=} opt_watcher Entry list watcher.
* @constructor
* @extends {cr.ui.ArrayDataModel}
*/
-function GalleryDataModel(metadataCache, opt_watcher) {
+function GalleryDataModel(metadataCache, fileSystemMetadata, opt_watcher) {
cr.ui.ArrayDataModel.call(this, []);
/**
* Metadata cache.
- * @type {!MetadataCache}
- * @private
+ * @private {!MetadataCache}
+ * @const
*/
this.metadataCache_ = metadataCache;
/**
+ * File system metadata.
+ * @private {!FileSystemMetadata}
+ * @const
+ */
+ this.fileSystemMetadata_ = fileSystemMetadata;
+
+ /**
* Directory where the image is saved if the image is located in a read-only
* volume.
- * @type {DirectoryEntry}
+ * @public {DirectoryEntry}
*/
this.fallbackSaveDirectory = null;
@@ -94,6 +102,7 @@ GalleryDataModel.prototype.saveItem = function(
oldLocationInfo,
oldMetadata,
this.metadataCache_,
+ this.fileSystemMetadata_,
item.isOriginal());
// The item must be added behind the existing item so that it does
// not change the index of the existing item.
« no previous file with comments | « ui/file_manager/gallery/js/gallery.js ('k') | ui/file_manager/gallery/js/gallery_data_model_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698