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

Unified Diff: chrome/browser/resources/file_manager/foreground/js/photo/mosaic_mode.js

Issue 109973002: Migrate from URLs to Entries in the Files App's gallery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 7 years 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: chrome/browser/resources/file_manager/foreground/js/photo/mosaic_mode.js
diff --git a/chrome/browser/resources/file_manager/foreground/js/photo/mosaic_mode.js b/chrome/browser/resources/file_manager/foreground/js/photo/mosaic_mode.js
index 58cf9cd8dfebb4660a33cc0ff9aa151e7e038310..6231864bbd8b1c43c545853cb227faf8c7125c41 100644
--- a/chrome/browser/resources/file_manager/foreground/js/photo/mosaic_mode.js
+++ b/chrome/browser/resources/file_manager/foreground/js/photo/mosaic_mode.js
@@ -309,9 +309,8 @@ Mosaic.prototype.initTiles_ = function(tiles, opt_callback) {
* @private
*/
Mosaic.prototype.initTile_ = function(tile, callback) {
- var url = tile.getItem().getUrl();
var onImageMeasured = callback;
- this.metadataCache_.get(url, Gallery.METADATA_TYPE,
+ this.metadataCache_.get(tile.getItem().getEntry(), Gallery.METADATA_TYPE,
function(metadata) {
tile.init(metadata, onImageMeasured);
});
@@ -1778,9 +1777,9 @@ Mosaic.Tile.prototype.init = function(metadata, onImageMeasured) {
var priority = this.getAttribute('selected') ? 2 : 3;
// Use embedded thumbnails on Drive, since they have higher resolution.
- var hidpiEmbedded = FileType.isOnDrive(this.getItem().getUrl());
+ var hidpiEmbedded = FileType.isOnDrive(this.getItem().getEntry());
this.thumbnailLoader_ = new ThumbnailLoader(
- this.getItem().getUrl(),
+ this.getItem().getEntry().toURL(),
ThumbnailLoader.LoaderType.CANVAS,
metadata,
undefined, // Media type.
@@ -1792,7 +1791,7 @@ Mosaic.Tile.prototype.init = function(metadata, onImageMeasured) {
// for preloading.
if (!hidpiEmbedded) {
this.thumbnailPreloader_ = new ThumbnailLoader(
- this.getItem().getUrl(),
+ this.getItem().getEntry().toURL(),
ThumbnailLoader.LoaderType.CANVAS,
metadata,
undefined, // Media type.

Powered by Google App Engine
This is Rietveld 408576698