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

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

Issue 1631923004: Sync 3rd party wallpaper app name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address tbarzic@'s comment. Created 4 years, 10 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 b1e402d9aa2b314772fabba9ada6cea8b290e01c..0cb7857cc1b48597c9941788fa70c2a5f6921e43 100644
--- a/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js
+++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/util.js
@@ -259,10 +259,6 @@ WallpaperUtil.setCustomWallpaperFromSyncFS = function(
console.error(chrome.runtime.lastError.message);
return;
}
- WallpaperUtil.storeWallpaperToLocalFS(wallpaperFilename,
- reader.result, Constants.WallpaperDirNameEnum.ORIGINAL);
- WallpaperUtil.storeWallpaperToLocalFS(wallpaperFilename,
- thumbnailData, Constants.WallpaperDirNameEnum.THUMBNAIL);
if (onSuccess)
onSuccess();
});
@@ -310,12 +306,15 @@ WallpaperUtil.saveToSyncStorage = function(key, value, opt_callback) {
* the file name.
* @param {string} layout The wallpaper layout.
* @param {string} source The wallpaper source.
+ * @param {string} appName The third party app name. If the current wallpaper is
+ * set by the built-in wallpaper picker, it is set to an empty string.
*/
-WallpaperUtil.saveWallpaperInfo = function(url, layout, source) {
+WallpaperUtil.saveWallpaperInfo = function(url, layout, source, appName) {
var wallpaperInfo = {
url: url,
layout: layout,
- source: source
+ source: source,
+ appName: appName,
};
WallpaperUtil.saveToLocalStorage(Constants.AccessLocalWallpaperInfoKey,
wallpaperInfo, function() {
@@ -379,8 +378,8 @@ WallpaperUtil.setOnlineWallpaper = function(url, layout, onSuccess, onFailure) {
if (xhr.response != null) {
chrome.wallpaperPrivate.setWallpaper(xhr.response, layout, url,
onSuccess);
- self.saveWallpaperInfo(url, layout,
- Constants.WallpaperSourceEnum.Online);
+ self.saveWallpaperInfo(
+ url, layout, Constants.WallpaperSourceEnum.Online, '');
} else {
onFailure();
}

Powered by Google App Engine
This is Rietveld 408576698