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

Unified Diff: chrome/browser/chromeos/extensions/wallpaper_private_api.cc

Issue 1631923004: Sync 3rd party wallpaper app name (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address tbarzic@'s comments. 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/chromeos/extensions/wallpaper_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
index 11387ea108b2f2b79b6a01e7a7447f861d980b1f..b53a7cb45064e6492160b2fe2e092af680faa8d4 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -634,11 +634,13 @@ void WallpaperPrivateSetCustomWallpaperFunction::OnWallpaperDecoded(
unsafe_wallpaper_decoder_ = NULL;
Profile* profile = Profile::FromBrowserContext(browser_context());
- // This API is only available to the component wallpaper picker. We do not
- // need to show the app's name if it is the component wallpaper picker. So set
- // the pref to empty string.
- profile->GetPrefs()->SetString(prefs::kCurrentWallpaperAppName,
- std::string());
+ if (params->third_party_app_name.get()) {
tbarzic 2016/02/02 20:59:38 What's the benefit of keeping to set this value if
xdai1 2016/02/04 01:46:33 Although it's unused now, I thought it would be be
+ profile->GetPrefs()->SetString(prefs::kCurrentWallpaperAppName,
+ *params->third_party_app_name);
+ } else {
+ profile->GetPrefs()->SetString(prefs::kCurrentWallpaperAppName,
+ std::string());
+ }
if (params->generate_thumbnail) {
image.EnsureRepsForSupportedScales();

Powered by Google App Engine
This is Rietveld 408576698