diff options
Diffstat (limited to 'ash/desktop_background/desktop_background_resources.cc')
-rw-r--r-- | ash/desktop_background/desktop_background_resources.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/ash/desktop_background/desktop_background_resources.cc b/ash/desktop_background/desktop_background_resources.cc index 8219624..64392e5 100644 --- a/ash/desktop_background/desktop_background_resources.cc +++ b/ash/desktop_background/desktop_background_resources.cc @@ -244,14 +244,6 @@ const int kGuestWallpaperIndex = kDefaultWallpaperIndex; namespace ash { -int GetSolidColorIndex() { - return kSolidColorIndex; -} - -int GetInvalidWallpaperIndex() { - return kInvalidWallpaperIndex; -} - int GetDefaultWallpaperIndex() { DCHECK(kDefaultWallpaperIndex < kDefaultWallpaperCount); return std::min(kDefaultWallpaperIndex, kDefaultWallpaperCount - 1); @@ -262,10 +254,17 @@ int GetGuestWallpaperIndex() { return std::min(kGuestWallpaperIndex, kDefaultWallpaperCount - 1); } -int GetRandomWallpaperIndex() { +int GetInvalidWallpaperIndex() { + return kInvalidWallpaperIndex; +} + +int GetNextWallpaperIndex(int index) { DCHECK(kLastRandomWallpaperIndex < kDefaultWallpaperCount); - return base::RandInt(0, - std::min(kLastRandomWallpaperIndex, kDefaultWallpaperCount - 1)); + return (index + 1) % (kLastRandomWallpaperIndex + 1); +} + +int GetSolidColorIndex() { + return kSolidColorIndex; } int GetWallpaperCount() { |