| Index: ash/desktop_background/desktop_background_resources.cc
|
| diff --git a/ash/desktop_background/desktop_background_resources.cc b/ash/desktop_background/desktop_background_resources.cc
|
| index 5b7d07fb2aead40447dc17815c752472ddb336fe..e5cf675f504c622dfa13eb0b9294e581961a68e0 100644
|
| --- a/ash/desktop_background/desktop_background_resources.cc
|
| +++ b/ash/desktop_background/desktop_background_resources.cc
|
| @@ -229,12 +229,14 @@ const int kInvalidWallpaperIndex = -1;
|
| // of the array are really hacky.
|
| #if defined(GOOGLE_CHROME_BUILD)
|
| const int kDefaultWallpaperIndex = 16; // IDR_AURA_WALLPAPERS_3_URBAN0
|
| +const int kLastRandomWallpaperIndex = 19; // The first 20 are random.
|
| const int kGuestWallpaperIndex = 26; // IDR_AURA_WALLPAPERS_5_GRADIENT6
|
| #else
|
| // Set default wallpaper to the grey background for faster wallpaper loading
|
| // time in browser tests. Otherwise, some of the tests will finish before
|
| // wallpaper loaded and cause crashes.
|
| const int kDefaultWallpaperIndex = 6; // IDR_AURA_WALLPAPERS_5_GRADIENT5
|
| +const int kLastRandomWallpaperIndex = 8;
|
| const int kGuestWallpaperIndex = kDefaultWallpaperIndex;
|
| #endif
|
|
|
| @@ -256,6 +258,12 @@ int GetGuestWallpaperIndex() {
|
| return std::min(kGuestWallpaperIndex, kDefaultWallpaperCount - 1);
|
| }
|
|
|
| +int GetRandomWallpaperIndex() {
|
| + DCHECK(kLastRandomWallpaperIndex < kDefaultWallpaperCount);
|
| + return base::RandInt(0,
|
| + std::min(kLastRandomWallpaperIndex, kDefaultWallpaperCount - 1));
|
| +}
|
| +
|
| int GetWallpaperCount() {
|
| return kDefaultWallpaperCount;
|
| }
|
|
|