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

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

Issue 17502005: Revert r207560 and r207566 to reland r207511. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add more SupportsMultipleDisplays checks Created 7 years, 6 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/login/wallpaper_manager.cc
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
index 9a0cc85aac6e66aa0ec15d1a3edfcf7bdbac4892..623588f8c65e4f23a2fb3bdf6880106b8ebcd37a 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -490,25 +490,10 @@ void WallpaperManager::SetCustomWallpaper(const std::string& username,
}
void WallpaperManager::SetDefaultWallpaper() {
- ash::DesktopBackgroundController* controller =
- ash::Shell::GetInstance()->desktop_background_controller();
- ash::WallpaperResolution resolution = controller->GetAppropriateResolution();
- ash::WallpaperInfo info;
- if (UserManager::Get()->IsLoggedInAsGuest()) {
- info = (resolution == ash::WALLPAPER_RESOLUTION_LARGE) ?
- ash::kGuestLargeWallpaper : ash::kGuestSmallWallpaper;
- } else {
- info = (resolution == ash::WALLPAPER_RESOLUTION_LARGE) ?
- ash::kDefaultLargeWallpaper : ash::kDefaultSmallWallpaper;
- }
-
- // Prevents loading of the same wallpaper as the currently loading/loaded one.
- if (controller->GetWallpaperIDR() == info.idr)
- return;
-
current_wallpaper_path_.clear();
- loaded_wallpapers_++;
- controller->SetDefaultWallpaper(info);
+ if (ash::Shell::GetInstance()->desktop_background_controller()->
+ SetDefaultWallpaper(UserManager::Get()->IsLoggedInAsGuest()))
+ loaded_wallpapers_++;
}
void WallpaperManager::SetInitialUserWallpaper(const std::string& username,

Powered by Google App Engine
This is Rietveld 408576698