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

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: Fix null-pointer exception 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 1293881f64baae99d0efd4dc25e23910cfe098b1..29805735208f05a532461ec164c99905a0dda56f 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
@@ -873,7 +873,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.
mtomasz 2014/09/17 09:29:48 ExternalProvider used to provide a thumbnail field
yoshiki 2014/09/17 09:57:09 I got it. I add the code to fill thumbnail field w
};
result.filesystem = {
@@ -881,18 +882,6 @@ ExternalProvider.prototype.convert_ = function(data, entry) {
modificationTime: new Date(data.lastModifiedTime)
};
- 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};
- }
-
// If present in cache, then allow to fetch media by next providers.
result.media = data.isPresent ? null : {};

Powered by Google App Engine
This is Rietveld 408576698