Index: chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc |
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc |
index 10fa0b1dafcb8a14ea4061724e03031bec6f2a75..6b1bd991b00819aadb3266a2b37dcbc1ddf60af5 100644 |
--- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc |
+++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc |
@@ -1055,6 +1055,13 @@ void WallpaperManager::ScheduleSetUserWallpaper(const std::string& user_id, |
GetPendingWallpaper(user_id, delayed) |
->ResetSetWallpaperImage(user_wallpaper, info); |
} else { |
+ if (info.file.empty()) { |
+ // Uses default built-in wallpaper when file is empty. Eventually, we |
+ // will only ship one built-in wallpaper in ChromeOS image. |
+ GetPendingWallpaper(user_id, delayed)->ResetSetDefaultWallpaper(); |
+ return; |
+ } |
+ |
if (info.type == User::CUSTOMIZED || info.type == User::POLICY) { |
const char* sub_dir = GetCustomWallpaperSubdirForCurrentResolution(); |
// Wallpaper is not resized when layout is ash::WALLPAPER_LAYOUT_CENTER. |
@@ -1074,13 +1081,6 @@ void WallpaperManager::ScheduleSetUserWallpaper(const std::string& user_id, |
return; |
} |
- if (info.file.empty()) { |
- // Uses default built-in wallpaper when file is empty. Eventually, we |
- // will only ship one built-in wallpaper in ChromeOS image. |
- GetPendingWallpaper(user_id, delayed)->ResetSetDefaultWallpaper(); |
- return; |
- } |
- |
// Load downloaded ONLINE or converted DEFAULT wallpapers. |
GetPendingWallpaper(user_id, delayed)->ResetLoadWallpaper(info); |
} |
@@ -1169,6 +1169,9 @@ void WallpaperManager::CacheUserWallpaper(const std::string& user_id) { |
return; |
WallpaperInfo info; |
if (GetUserWallpaperInfo(user_id, &info)) { |
+ if (info.file.empty()) |
+ return; |
+ |
base::FilePath wallpaper_dir; |
base::FilePath wallpaper_path; |
if (info.type == User::CUSTOMIZED || info.type == User::POLICY) { |