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

Unified Diff: ui/file_manager/video_player/js/video_player.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/video_player/js/video_player.js
diff --git a/ui/file_manager/video_player/js/video_player.js b/ui/file_manager/video_player/js/video_player.js
index b941805ccdc13c36163bf96b1d00ac8921ec3a69..8ec36daef235af685cec126c4bb4b11ae68e5c8a 100644
--- a/ui/file_manager/video_player/js/video_player.js
+++ b/ui/file_manager/video_player/js/video_player.js
@@ -320,8 +320,12 @@ VideoPlayer.prototype.loadVideo_ = function(video, opt_callback) {
function(results) {
var url = results[0];
var token = results[1];
- document.querySelector('#thumbnail').style.backgroundImage =
- 'url(' + url + '&access_token=' + token + ')';
+ if (url && token) {
+ document.querySelector('#thumbnail').style.backgroundImage =
+ 'url(' + url + '&access_token=' + token + ')';
mtomasz 2014/09/17 09:29:48 Can we append the access token in C++? I'm working
yoshiki 2014/09/17 09:57:09 I'll do it. But please leave it as it is at this t
+ } else {
+ document.querySelector('#thumbnail').style.backgroundImage = '';
+ }
}).catch(function() {
// Shows no image on error.
document.querySelector('#thumbnail').style.backgroundImage = '';

Powered by Google App Engine
This is Rietveld 408576698