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

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

Issue 831833004: Files.app: Stop to use drive thumbnail for cached files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/gallery/js/mosaic_mode.js
diff --git a/ui/file_manager/gallery/js/mosaic_mode.js b/ui/file_manager/gallery/js/mosaic_mode.js
index 69ace4b54ff42c7149170ca9afa7036e0e8bc9f4..f20f5fae3a3fa902f634e23969d672e85cdf3434 100644
--- a/ui/file_manager/gallery/js/mosaic_mode.js
+++ b/ui/file_manager/gallery/js/mosaic_mode.js
@@ -1830,12 +1830,6 @@ Mosaic.Tile = function(container, item, opt_locationInfo) {
this.item_ = item;
/**
- * @type {boolean}
- * @private
- */
- this.hidpiEmbedded_ = !!opt_locationInfo && opt_locationInfo.isDriveBased;
-
- /**
* @type {?number}
* @private
*/
@@ -2059,23 +2053,28 @@ Mosaic.Tile.prototype.init = function() {
ThumbnailLoader.LoaderType.CANVAS,
metadata,
undefined, // Media type.
- this.hidpiEmbedded_ ?
- ThumbnailLoader.UseEmbedded.USE_EMBEDDED :
- ThumbnailLoader.UseEmbedded.NO_EMBEDDED,
- priority);
+ [
+ ThumbnailLoader.LoadTarget.EXTERNAL_METADATA,
+ ThumbnailLoader.LoadTarget.FILE_ENTRY
+ ]);
// If no hidpi embedded thumbnail available, then use the low resolution
// for preloading.
- if (!this.hidpiEmbedded_) {
+ if (this.thumbnailLoader_.getLoadTarget() ==
mtomasz 2015/01/09 05:58:50 nit: ===
hirono 2015/01/09 07:11:47 Done.
+ ThumbnailLoader.LoadTarget.FILE_ENTRY) {
this.thumbnailPreloader_ = new ThumbnailLoader(
this.getItem().getEntry(),
ThumbnailLoader.LoaderType.CANVAS,
metadata,
undefined, // Media type.
- ThumbnailLoader.UseEmbedded.USE_EMBEDDED,
+ [
+ ThumbnailLoader.LoadTarget.CONTENT_METADATA
+ ],
// Preloaders have always higher priotity, so the preload images
// are loaded as soon as possible.
2);
+ if (!this.thumbnailPreloader_.getLoadTarget())
+ this.thumbnailPreloader_ = null;
}
// Dimensions are always acquired from the metadata. For local files, it is

Powered by Google App Engine
This is Rietveld 408576698