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

Unified Diff: chrome/browser/chromeos/login/wallpaper_manager.cc

Issue 10827376: Use default wallpaper at login screen when user choose a custom wallpaper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments Created 8 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/wallpaper_manager.cc
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
index 06837af7f81472e8c14528b795c9c96883445016..97ccbe01df5471aaabbded809ec51e6935b0949b 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -399,17 +399,15 @@ void WallpaperManager::SetUserWallpaper(const std::string& email) {
index = ash::GetNextWallpaperIndex(index);
SaveUserWallpaperProperties(email, User::DAILY, index);
} else if (type == User::CUSTOMIZED) {
- gfx::ImageSkia custom_wallpaper;
- if (GetCustomWallpaperFromCache(email, &custom_wallpaper)) {
- // In customized mode, we use index pref to save the user selected
- // wallpaper layout. See function SaveWallpaperToLocalState().
- ash::WallpaperLayout layout = static_cast<ash::WallpaperLayout>(index);
- ash::Shell::GetInstance()->desktop_background_controller()->
- SetCustomWallpaper(custom_wallpaper, layout);
+ // For security reason, use default wallpaper instead of custom wallpaper
+ // at login screen. The security issue is tracked in issue 143198. Once it
+ // fixed, we should then only use custom wallpaper.
+ if (!UserManager::Get()->IsUserLoggedIn()) {
+ index = ash::GetDefaultWallpaperIndex();
} else {
FetchCustomWallpaper(email);
+ return;
}
- return;
}
ash::Shell::GetInstance()->desktop_background_controller()->
SetDefaultWallpaper(index, false);
@@ -490,12 +488,8 @@ void WallpaperManager::CacheUserWallpaper(const std::string& email) {
base::Time date;
GetUserWallpaperProperties(email, &type, &index, &date);
if (type == User::CUSTOMIZED) {
- std::string wallpaper_path = GetWallpaperPathForUser(email, false).value();
-
- // Uses WeakPtr here to make the request cancelable.
- wallpaper_loader_->Start(wallpaper_path, 0,
- base::Bind(&WallpaperManager::CacheWallpaper,
- weak_factory_.GetWeakPtr(), email));
+ ash::Shell::GetInstance()->desktop_background_controller()->
+ CacheDefaultWallpaper(ash::GetDefaultWallpaperIndex());
} else {
ash::Shell::GetInstance()->desktop_background_controller()->
CacheDefaultWallpaper(index);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698