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

Unified Diff: chrome/browser/chromeos/login/user_manager_impl.h

Issue 10384079: Reland "Implement random wallpaper feature" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.cc ('k') | chrome/browser/chromeos/login/user_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.cc ('k') | chrome/browser/chromeos/login/user_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698