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

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: Rebased. 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..dbe095c94cd207398e6b98a49d96da70909c0c89 100644
--- a/ui/file_manager/gallery/js/gallery_data_model.js
+++ b/ui/file_manager/gallery/js/gallery_data_model.js
@@ -6,11 +6,12 @@
* 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, []);
/**
@@ -21,6 +22,13 @@ function GalleryDataModel(metadataCache, opt_watcher) {
this.metadataCache_ = metadataCache;
/**
+ * File system metadata.
+ * @type {!FileSystemMetadata}
yawano 2015/02/25 06:39:54 very small nit: This can be const?
hirono 2015/02/25 06:45:22 Yes! Thanks!
+ * @private
+ */
+ this.fileSystemMetadata_ = fileSystemMetadata;
+
+ /**
* Directory where the image is saved if the image is located in a read-only
* volume.
* @type {DirectoryEntry}
@@ -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