Chromium Code Reviews| Index: chrome/browser/resources/chromeos/wallpaper_manager/js/util.js |
| diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js |
| index de8c5187886a5fd7e56ce86e4c502f26c39ce69a..3baf9a7ff605208201ecd06de389584a30dbb6e0 100644 |
| --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js |
| +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js |
| @@ -77,13 +77,19 @@ WallpaperUtil.deleteWallpaperFromSyncFS = function(wallpaperFilename) { |
| function(fe) { |
| fe.remove(function() {}, null); |
| }, |
| - WallpaperUtil.onFileSystemError); |
| + function(e) { |
| + if (e.name != 'NotFoundError') |
|
bshe
2016/01/13 18:43:17
would be good to add a command why we want to igno
xdai1
2016/01/14 23:03:51
Done.
|
| + WallpaperUtil.onFileSystemError(e); |
| + }); |
| fs.root.getFile(thumbnailFilename, |
| {create: false}, |
| function(fe) { |
| fe.remove(function() {}, null); |
| }, |
| - WallpaperUtil.onFileSystemError); |
| + function(e) { |
| + if (e.name != 'NotFoundError') |
| + WallpaperUtil.onFileSystemError(e); |
| + }); |
| }; |
| WallpaperUtil.requestSyncFS(success); |
| }; |
| @@ -247,7 +253,7 @@ WallpaperUtil.setCustomWallpaperFromSyncFS = function( |
| WallpaperUtil.storeWallpaperToLocalFS(wallpaperFilename, |
| reader.result, Constants.WallpaperDirNameEnum.ORIGINAL); |
| WallpaperUtil.storeWallpaperToLocalFS(wallpaperFilename, |
| - reader.result, Constants.WallpaperDirNameEnum.THUMBNAIL); |
| + thumbnailData, Constants.WallpaperDirNameEnum.THUMBNAIL); |
|
bshe
2016/01/08 19:56:39
this seem to fix a different issue. do you mind la
xdai1
2016/01/08 20:17:48
Sure! I will separate it in another CL.
|
| if (onSuccess) |
| onSuccess(); |
| }); |