| Index: chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
|
| diff --git a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
|
| index ea66985b36e708b054e811f62694fc36aaee379b..d56f8181c0f142868bf29701559a4d7498664548 100644
|
| --- a/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
|
| +++ b/chrome/browser/resources/chromeos/wallpaper_manager/js/wallpaper_manager.js
|
| @@ -285,14 +285,6 @@ function WallpaperManager(dialogDom) {
|
| $('set-wallpaper-layout').addEventListener(
|
| 'change', this.onWallpaperLayoutChanged_.bind(this));
|
|
|
| - if (loadTimeData.valueExists('wallpaperAppName')) {
|
| - $('wallpaper-set-by-message').textContent = loadTimeData.getStringF(
|
| - 'currentWallpaperSetByMessage', str('wallpaperAppName'));
|
| - $('wallpaper-grid').classList.add('small');
|
| - } else {
|
| - $('wallpaper-grid').classList.remove('small');
|
| - }
|
| -
|
| if (this.enableOnlineWallpaper_) {
|
| var self = this;
|
| self.document_.body.setAttribute('surprise-me-disabled', '');
|
| @@ -333,6 +325,22 @@ function WallpaperManager(dialogDom) {
|
| });
|
| }
|
| });
|
| +
|
| + // Prefer Third party app name from sync filesystem, but if sync theme
|
| + // is disabled, use the value from local filesystem.
|
| + Constants.WallpaperSyncStorage.get(
|
| + Constants.AccessSyncThirdPartyAppName, function(items) {
|
| + if (items.hasOwnProperty(Constants.AccessSyncThirdPartyAppName) &&
|
| + items[Constants.AccessSyncThirdPartyAppName]) {
|
| + $('wallpaper-set-by-message').textContent =
|
| + loadTimeData.getStringF('currentWallpaperSetByMessage',
|
| + items[Constants.AccessSyncThirdPartyAppName]);
|
| + $('wallpaper-grid').classList.add('small');
|
| + } else {
|
| + $('wallpaper-grid').classList.remove('small');
|
| + }
|
| + });
|
| +
|
| } else {
|
| Constants.WallpaperLocalStorage.get(
|
| Constants.AccessLocalSurpriseMeEnabledKey, function(items) {
|
| @@ -343,6 +351,19 @@ function WallpaperManager(dialogDom) {
|
| }
|
| }
|
| });
|
| +
|
| + Constants.WallpaperLocalStorage.get(
|
| + Constants.AccessLocalThirdPartyAppName, function(items) {
|
| + if (items.hasOwnProperty(Constants.AccessLocalThirdPartyAppName) &&
|
| + items[Constants.AccessLocalThirdPartyAppName]) {
|
| + $('wallpaper-set-by-message').textContent =
|
| + loadTimeData.getStringF('currentWallpaperSetByMessage',
|
| + items[Constants.AccessLocalThirdPartyAppName]);
|
| + $('wallpaper-grid').classList.add('small');
|
| + } else {
|
| + $('wallpaper-grid').classList.remove('small');
|
| + }
|
| + });
|
| }
|
| });
|
|
|
| @@ -551,6 +572,9 @@ function WallpaperManager(dialogDom) {
|
| // Hides the wallpaper set by message.
|
| $('wallpaper-set-by-message').textContent = '';
|
| $('wallpaper-grid').classList.remove('small');
|
| + // If the user manually selects a wallpaper from the built-in wallpaper
|
| + // picker app, we should clear the third party app name if possible.
|
| + WallpaperUtil.clearThirdPartyAppName();
|
| };
|
|
|
| /**
|
|
|