| 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();
|
|
|