| Index: ui/file_manager/file_manager/foreground/js/thumbnail_loader.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/thumbnail_loader.js b/ui/file_manager/file_manager/foreground/js/thumbnail_loader.js
|
| index 83d3b391649c95c01529d11b29bd548b7ad45c6e..2d6aaff509455dbac35c4e79ed958ac4da47ccf3 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/thumbnail_loader.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/thumbnail_loader.js
|
| @@ -252,7 +252,7 @@ ThumbnailLoader.prototype.load = function(box, fillMode, opt_optimizationMode,
|
| * which is resolved when data url is fetched.
|
| */
|
| ThumbnailLoader.prototype.loadAsDataUrl = function() {
|
| - return new Promise(function(resolve) {
|
| + return new Promise(function(resolve, reject) {
|
| // Load by using ImageLoaderClient.
|
| var modificationTime = this.metadata_ &&
|
| this.metadata_.filesystem &&
|
| @@ -260,7 +260,12 @@ ThumbnailLoader.prototype.loadAsDataUrl = function() {
|
| this.metadata_.filesystem.modificationTime.getTime();
|
| ImageLoaderClient.getInstance().load(
|
| this.thumbnailUrl_,
|
| - resolve,
|
| + function(result) {
|
| + if (result.status === 'success')
|
| + resolve(result);
|
| + else
|
| + reject(result);
|
| + },
|
| {
|
| maxWidth: ThumbnailLoader.THUMBNAIL_MAX_WIDTH,
|
| maxHeight: ThumbnailLoader.THUMBNAIL_MAX_HEIGHT,
|
|
|