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

Unified Diff: ash/desktop_background/desktop_background_controller.cc

Issue 236013002: Apply default wallpaper from customization manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: After-review. Created 6 years, 8 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: 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) {

Powered by Google App Engine
This is Rietveld 408576698