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

Unified Diff: ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js

Issue 574293002: Files.app: Show thumbnail of non-image file even when the file cache is present (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 3 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/file_manager/foreground/js/metadata/metadata_cache.js
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js
index ccfd49639fffe123162771b844a4566a67699769..f72d3dd2d983afc2aba1112c0dad970be54ea100 100644
--- a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js
+++ b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache.js
@@ -874,7 +874,8 @@ ExternalProvider.prototype.convert_ = function(data, entry) {
customIconUrl: data.customIconUrl || '',
contentMimeType: data.contentMimeType || '',
sharedWithMe: data.sharedWithMe,
- shared: data.shared
+ shared: data.shared,
+ thumbnailUrl: data.thumbnailUrl // Thumbnail passed from external server.
};
result.filesystem = {
@@ -882,13 +883,15 @@ ExternalProvider.prototype.convert_ = function(data, entry) {
modificationTime: new Date(data.lastModifiedTime)
};
- if ('thumbnailUrl' in data) {
+ if (data.isPresent) {
+ // If the file is present, don't fill the thumbnail here and allow to
+ // generate it by next providers.
+ result.thumbnail = null;
+ } else if ('thumbnailUrl' in data) {
result.thumbnail = {
url: data.thumbnailUrl,
transform: null
};
- } else if (data.isPresent) {
- result.thumbnail = null;
} else {
// Not present in cache, so do not allow to generate it by next providers.
result.thumbnail = {url: '', transform: null};

Powered by Google App Engine
This is Rietveld 408576698