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

Unified Diff: chrome/browser/resources/chromeos/wallpaper_manager/js/util.js

Issue 1566713005: Make the third party wallpaper syncable through different devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a TODO Created 4 years, 11 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: 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 90191d6b15f41baf2342ae7787a493e2e2821a8d..b1e402d9aa2b314772fabba9ada6cea8b290e01c 100644
--- a/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js
+++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js
@@ -77,13 +77,28 @@ WallpaperUtil.deleteWallpaperFromSyncFS = function(wallpaperFilename) {
function(fe) {
fe.remove(function() {}, null);
},
- WallpaperUtil.onFileSystemError);
+ function(e) {
+ // NotFoundError is expected under the following scenario:
+ // The user uses a same account on device A and device B.
+ // The current wallpaper is a third party wallpaper. Then
+ // the user changes it to a ONLINE wallpaper on device A.
+ // Sync file system change and local file system change
+ // will then both be fired on device B, which makes the
+ // third party wallpaper be deleted twice from the sync
+ // file system. We should ignore this error.
+ if (e.name != 'NotFoundError')
+ WallpaperUtil.onFileSystemError(e);
+ });
fs.root.getFile(thumbnailFilename,
{create: false},
function(fe) {
fe.remove(function() {}, null);
},
- WallpaperUtil.onFileSystemError);
+ function(e) {
+ // Same as above.
+ if (e.name != 'NotFoundError')
+ WallpaperUtil.onFileSystemError(e);
+ });
};
WallpaperUtil.requestSyncFS(success);
};

Powered by Google App Engine
This is Rietveld 408576698