| 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 84da8b0d635c4c345ab0546492e3ef67b9a44722..2a72b224a0d26cece18a7dd3e5ec333ebae08d28 100644
|
| --- a/ash/desktop_background/desktop_background_controller.cc
|
| +++ b/ash/desktop_background/desktop_background_controller.cc
|
| @@ -132,7 +132,7 @@ class DesktopBackgroundController::WallpaperLoader
|
|
|
| DesktopBackgroundController::DesktopBackgroundController()
|
| : locked_(false),
|
| - desktop_background_mode_(BACKGROUND_SOLID_COLOR),
|
| + desktop_background_mode_(BACKGROUND_NONE),
|
| background_color_(kTransparentColor),
|
| weak_ptr_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
|
| }
|
| @@ -180,6 +180,10 @@ int DesktopBackgroundController::GetWallpaperIDR() const {
|
|
|
| void DesktopBackgroundController::OnRootWindowAdded(
|
| aura::RootWindow* root_window) {
|
| + // The background hasn't been set yet.
|
| + if (desktop_background_mode_ == BACKGROUND_NONE)
|
| + return;
|
| +
|
| // Handle resolution change for "built-in" images.
|
| if (BACKGROUND_IMAGE == desktop_background_mode_ &&
|
| current_wallpaper_.get()) {
|
| @@ -347,9 +351,9 @@ void DesktopBackgroundController::InstallDesktopController(
|
| component = new internal::DesktopBackgroundWidgetController(layer);
|
| break;
|
| }
|
| - default: {
|
| + case BACKGROUND_NONE:
|
| NOTREACHED();
|
| - }
|
| + return;
|
| }
|
| // Ensure we're only observing the root window once. Don't rely on a window
|
| // property check as those can be cleared by tests resetting the background.
|
|
|