Chromium Code Reviews| 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. |