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

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: Fix. 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
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/image_view_unittest.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..930eea83e1077fc4d0f6c36a2c6242cde1a21eaa 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() ===
+ 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
« no previous file with comments | « ui/file_manager/gallery/js/image_editor/image_view_unittest.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698