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

Unified Diff: chrome/browser/chromeos/login/user_manager.cc

Issue 9580023: Enable user change background image in settings page in Aura build. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: More refactor Created 8 years, 10 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
Index: chrome/browser/chromeos/login/user_manager.cc
diff --git a/chrome/browser/chromeos/login/user_manager.cc b/chrome/browser/chromeos/login/user_manager.cc
index 3b56995820865b357fa56d6669ff451387731f35..6071c003838a8ad59f4125d7a3d333091a21ef5d 100644
--- a/chrome/browser/chromeos/login/user_manager.cc
+++ b/chrome/browser/chromeos/login/user_manager.cc
@@ -839,6 +839,22 @@ void UserManager::SetInitialUserImage(const std::string& username) {
SaveUserDefaultImageIndex(username, image_id);
}
+int UserManager::GetUserWallpaper(const std::string& username) {
+ User* user = const_cast<User*>(FindUser(username));
+ if (user) {
+ return user->wallpaper_index();
+ }
+ return User::kDefaultWallpaperIndex;
+}
+
+void UserManager::SetUserWallpaper(const std::string& username,
+ int wallpaper_index) {
+ User* user = const_cast<User*>(FindUser(username));
+ if (user) {
+ user->SetWallpaper(wallpaper_index);
+ }
+}
+
void UserManager::SetUserImage(const std::string& username,
int image_index,
const SkBitmap& image) {

Powered by Google App Engine
This is Rietveld 408576698