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

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: Remove cache wallpaper 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..702ec67fbb11489cea072cc52540d63034fe98ce 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -399,17 +399,12 @@ 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)) {
Ivan Korotkov 2012/08/16 15:45:01 Why is GetCustomWallpaperFromCache not needed anym
bshe 2012/08/16 22:32:49 If we cache (load from file and decode it) the cus
- // 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);
+ if (!UserManager::Get()->IsUserLoggedIn()) {
+ index = ash::GetDefaultWallpaperIndex();
Ivan Korotkov 2012/08/16 15:45:01 Please comment on the purpose of this.
bshe 2012/08/16 22:32:49 Done On 2012/08/16 15:45:01, Ivan Korotkov wrote:
} else {
FetchCustomWallpaper(email);
+ return;
}
- return;
}
ash::Shell::GetInstance()->desktop_background_controller()->
SetDefaultWallpaper(index, false);
@@ -490,12 +485,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