| Index: chrome/browser/chromeos/login/user_manager_impl.cc
|
| diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
|
| index e8dab96e48c31ae9fbbd1b9eac940cb8b2b02d24..865e96a81c3e9cd2dbcaa5d0a3d18da538a2fdf5 100644
|
| --- a/chrome/browser/chromeos/login/user_manager_impl.cc
|
| +++ b/chrome/browser/chromeos/login/user_manager_impl.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <vector>
|
|
|
| +#include "ash/desktop_background/desktop_background_resources.h"
|
| #include "base/bind.h"
|
| #include "base/command_line.h"
|
| #include "base/compiler_specific.h"
|
| @@ -438,6 +439,10 @@ void UserManagerImpl::RemoveUserFromList(const std::string& email) {
|
| user_to_remove = it;
|
| }
|
|
|
| + DictionaryPrefUpdate prefs_wallpapers_update(prefs,
|
| + UserManager::kUserWallpapers);
|
| + prefs_wallpapers_update->RemoveWithoutPathExpansion(email, NULL);
|
| +
|
| DictionaryPrefUpdate prefs_images_update(prefs, UserManager::kUserImages);
|
| std::string image_path_string;
|
| prefs_images_update->GetStringWithoutPathExpansion(email, &image_path_string);
|
| @@ -837,6 +842,33 @@ void UserManagerImpl::SetInitialUserImage(const std::string& username) {
|
| SaveUserDefaultImageIndex(username, image_id);
|
| }
|
|
|
| +int UserManagerImpl::GetUserWallpaper(const std::string& username) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| +
|
| + PrefService* local_state = g_browser_process->local_state();
|
| + const DictionaryValue* user_wallpapers =
|
| + local_state->GetDictionary(UserManager::kUserWallpapers);
|
| + int index = ash::GetPresetWallpaperIndex();
|
| + user_wallpapers->GetIntegerWithoutPathExpansion(username,
|
| + &index);
|
| + return index;
|
| +}
|
| +
|
| +void UserManagerImpl::SaveWallpaperDefaultIndex(const std::string& username,
|
| + int wallpaper_index) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| +
|
| + PrefService* local_state = g_browser_process->local_state();
|
| + DictionaryPrefUpdate wallpapers_update(local_state,
|
| + UserManager::kUserWallpapers);
|
| + wallpapers_update->SetWithoutPathExpansion(username,
|
| + new base::FundamentalValue(wallpaper_index));
|
| + content::NotificationService::current()->Notify(
|
| + chrome::NOTIFICATION_DESKTOP_BACKGROUND_CHANGED,
|
| + content::Source<UserManagerImpl>(this),
|
| + content::Details<int>(&wallpaper_index));
|
| +}
|
| +
|
| void UserManagerImpl::SetUserImage(const std::string& username,
|
| int image_index,
|
| const SkBitmap& image) {
|
|
|