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

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 9da0e4275e618a1a9d88f71a9d5c53e8f3d727d7..b6bef613c8ab2da2b697620dd0473b1a944c2d64 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -317,12 +317,6 @@ bool WallpaperPrivateGetStringsFunction::RunSync() {
dict->SetString("manifestBaseURL", kWallpaperManifestBaseURL);
#endif
- Profile* profile = Profile::FromBrowserContext(browser_context());
- std::string app_name(
- profile->GetPrefs()->GetString(prefs::kCurrentWallpaperAppName));
- if (!app_name.empty())
- dict->SetString("wallpaperAppName", app_name);
-
dict->SetBoolean("isOEMDefaultWallpaper", IsOEMDefaultWallpaper());
dict->SetString("canceledWallpaper",
wallpaper_api_util::kCancelWallpaperMessage);
@@ -437,12 +431,6 @@ void WallpaperPrivateSetWallpaperIfExistsFunction::OnWallpaperDecoded(
base::Time::Now().LocalMidnight()};
wallpaper_manager->SetUserWallpaperInfo(account_id_, info, is_persistent);
SetResult(new base::FundamentalValue(true));
- 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());
SendResponse(true);
}
@@ -545,12 +533,6 @@ void WallpaperPrivateSetWallpaperFunction::SetDecodedWallpaper(
layout,
user_manager::User::ONLINE,
base::Time::Now().LocalMidnight()};
- 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());
wallpaper_manager->SetUserWallpaperInfo(account_id_, info, is_persistent);
SendResponse(true);
}
@@ -578,12 +560,6 @@ bool WallpaperPrivateResetWallpaperFunction::RunAsync() {
wallpaper_manager->SetUserWallpaperInfo(account_id, info, is_persistent);
wallpaper_manager->SetDefaultWallpaperNow(account_id);
- 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());
return true;
}
@@ -633,12 +609,6 @@ void WallpaperPrivateSetCustomWallpaperFunction::OnWallpaperDecoded(
user_manager::User::CUSTOMIZED, image, update_wallpaper);
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->generate_thumbnail) {
image.EnsureRepsForSupportedScales();

Powered by Google App Engine
This is Rietveld 408576698