| Index: chrome/browser/chromeos/login/user_manager_impl.h
|
| diff --git a/chrome/browser/chromeos/login/user_manager_impl.h b/chrome/browser/chromeos/login/user_manager_impl.h
|
| index e4d7444fdf62ccf1e45ed2958d0e698b9b90eb3b..b5d2d5333f02d62c43d858d03a17744e0efb8638 100644
|
| --- a/chrome/browser/chromeos/login/user_manager_impl.h
|
| +++ b/chrome/browser/chromeos/login/user_manager_impl.h
|
| @@ -65,8 +65,11 @@ class UserManagerImpl : public UserManager,
|
| const std::string& display_email) OVERRIDE;
|
| virtual std::string GetUserDisplayEmail(
|
| const std::string& username) const OVERRIDE;
|
| - virtual int GetUserWallpaperIndex() OVERRIDE;
|
| - virtual void SaveUserWallpaperIndex(int wallpaper_index) OVERRIDE;
|
| + virtual int GetLoggedInUserWallpaperIndex() OVERRIDE;
|
| + virtual void GetLoggedInUserWallpaperProperties(User::WallpaperType& type,
|
| + int& index) OVERRIDE;
|
| + virtual void SaveLoggedInUserWallpaperProperties(User::WallpaperType type,
|
| + int index) OVERRIDE;
|
| virtual void SaveUserDefaultImageIndex(const std::string& username,
|
| int image_index) OVERRIDE;
|
| virtual void SaveUserImage(const std::string& username,
|
| @@ -129,8 +132,6 @@ class UserManagerImpl : public UserManager,
|
| // list. Returns |NULL| otherwise.
|
| const User* FindUserInList(const std::string& email) const;
|
|
|
| - int FindUserWallpaperIndex(const std::string& email);
|
| -
|
| // Makes stub user the current logged-in user (for test paths).
|
| void StubUserLoggedIn();
|
|
|
| @@ -151,6 +152,12 @@ class UserManagerImpl : public UserManager,
|
| // settings in local state.
|
| void SetInitialUserWallpaper(const std::string& username);
|
|
|
| + // Migrate the old wallpaper index to a new wallpaper structure.
|
| + // The new wallpaper structure is:
|
| + // { WallpaperType: RANDOM|CUSTOMIZED|DEFAULT,
|
| + // index: index of the default wallpapers }
|
| + void MigrateWallpaperData();
|
| +
|
| // Sets image for user |username| and sends LOGIN_USER_IMAGE_CHANGED
|
| // notification unless this is a new user and image is set for the first time.
|
| // If |image| is empty, sets a stub image for the user.
|
| @@ -158,6 +165,13 @@ class UserManagerImpl : public UserManager,
|
| int image_index,
|
| const SkBitmap& image);
|
|
|
| + void GetUserWallpaperProperties(const std::string& username,
|
| + User::WallpaperType& type,
|
| + int& index);
|
| + void SaveUserWallpaperProperties(const std::string& username,
|
| + User::WallpaperType type,
|
| + int index);
|
| +
|
| // Saves image to file, updates local state preferences to given image index
|
| // and sends LOGIN_USER_IMAGE_CHANGED notification.
|
| void SaveUserImageInternal(const std::string& username,
|
| @@ -242,7 +256,8 @@ class UserManagerImpl : public UserManager,
|
| // mounting their cryptohomes using tmpfs.
|
| bool is_current_user_ephemeral_;
|
|
|
| - // Cache current user selected index in memory.
|
| + User::WallpaperType current_user_wallpaper_type_;
|
| +
|
| int current_user_wallpaper_index_;
|
|
|
| // The key store for the current user has been loaded. This flag is needed to
|
|
|