Chromium Code Reviews| 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 fe111c05e098aabce876793c002f18a606ee2336..02ef5d79c28da360c9cb970c83edf2c53e5a41ef 100644 |
| --- a/ash/desktop_background/desktop_background_controller.cc |
| +++ b/ash/desktop_background/desktop_background_controller.cc |
| @@ -43,6 +43,8 @@ const int kWallpaperReloadDelayMs = 2000; |
| } // namespace |
| +const int kInvalidResourceID = -1; |
| + |
| DesktopBackgroundController::DesktopBackgroundController() |
| : locked_(false), |
| desktop_background_mode_(BACKGROUND_NONE), |
| @@ -198,7 +200,9 @@ bool DesktopBackgroundController::WallpaperIsAlreadyLoaded( |
| if (!current_wallpaper_.get()) |
| return false; |
| - if (layout != current_wallpaper_->layout()) |
| + // Do not compare layouts if WALLPAPER_LAYOUT_UNKNOWN passed. |
| + if (WALLPAPER_LAYOUT_UNKNOWN != layout && |
|
Daniel Erat
2014/04/14 15:26:15
please put the variable first and the constant sec
Alexander Alekseev
2014/04/15 01:57:16
Done.
|
| + layout != current_wallpaper_->layout()) |
| return false; |
| if (image) { |