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

Unified Diff: ui/file_manager/gallery/js/image_editor/image_view.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
Index: ui/file_manager/gallery/js/image_editor/image_view.js
diff --git a/ui/file_manager/gallery/js/image_editor/image_view.js b/ui/file_manager/gallery/js/image_editor/image_view.js
index 478add01ad8adbe0e44c7a7db522df7722255e1e..fc01d376fc506752ca2a04c3ab25d569db7caa3c 100644
--- a/ui/file_manager/gallery/js/image_editor/image_view.js
+++ b/ui/file_manager/gallery/js/image_editor/image_view.js
@@ -150,9 +150,12 @@ ImageView.getLoadTarget = function(item, effect) {
// Only show thumbnails if there is no effect or the effect is Slide.
var metadata = item.getMetadata();
+ var thumbnailLoader = new ThumbnailLoader(
+ item.getEntry(), ThumbnailLoader.LoaderType.CANVAS, item.getMetadata());
if ((effect instanceof ImageView.Effect.None ||
effect instanceof ImageView.Effect.Slide) &&
- ThumbnailLoader.hasThumbnailInMetadata(metadata)) {
+ thumbnailLoader.getLoadTarget() !==
+ ThumbnailLoader.LoadTarget.FILE_ENTRY) {
return ImageView.LoadTarget.THUMBNAIL;
}

Powered by Google App Engine
This is Rietveld 408576698