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

Unified Diff: ash/desktop_background/desktop_background_controller.cc

Issue 10459003: Load user custom wallpaper after browser crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix aura_shell_unittests Created 8 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
« no previous file with comments | « ash/desktop_background/desktop_background_controller.h ('k') | ash/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/desktop_background/desktop_background_controller.cc
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc
index 5994bf2326736021607071c81c048edc2cb3a8ed..9014754e5f9043981f968a4b60b06c4e7eecb158 100644
--- a/ash/desktop_background/desktop_background_controller.cc
+++ b/ash/desktop_background/desktop_background_controller.cc
@@ -99,6 +99,13 @@ DesktopBackgroundController::~DesktopBackgroundController() {
}
void DesktopBackgroundController::SetDefaultWallpaper(int index) {
+ // We should not change background when index is invalid. For instance, at
+ // login screen or stub_user login.
+ if (index == ash::GetInvalidWallpaperIndex()) {
+ CreateEmptyWallpaper();
+ return;
+ }
+
if (previous_index_ == index)
return;
@@ -131,19 +138,6 @@ void DesktopBackgroundController::CancelPendingWallpaperOperation() {
weak_ptr_factory_.InvalidateWeakPtrs();
}
-void DesktopBackgroundController::SetLoggedInUserWallpaper() {
- int index = Shell::GetInstance()->user_wallpaper_delegate()->
- GetUserWallpaperIndex();
- // We should not change background when index is invalid. For instance, at
- // login screen or stub_user login.
- if (index == ash::GetInvalidWallpaperIndex()) {
- CreateEmptyWallpaper();
- return;
- }
-
- SetDefaultWallpaper(index);
-}
-
void DesktopBackgroundController::SetDesktopBackgroundSolidColorMode() {
// Set a solid black background.
// TODO(derat): Remove this in favor of having the compositor only clear the
« no previous file with comments | « ash/desktop_background/desktop_background_controller.h ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698