| Index: chrome/browser/chromeos/login/wallpaper_manager.cc
|
| diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| index 89638ee30469ad136da1b12deafd67fec25655a5..94e26257307efa5527b50c371a9fd7eae46f7c41 100644
|
| --- a/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| +++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
|
| @@ -216,32 +216,13 @@ void WallpaperManager::InitializeWallpaper() {
|
|
|
| bool disable_new_oobe = CommandLine::ForCurrentProcess()->
|
| HasSwitch(switches::kDisableNewOobe);
|
| - bool disable_boot_animation = CommandLine::ForCurrentProcess()->
|
| - HasSwitch(switches::kDisableBootAnimation);
|
|
|
| if (!user_manager->IsUserLoggedIn()) {
|
| if (!disable_new_oobe) {
|
| if (!WizardController::IsDeviceRegistered()) {
|
| SetDefaultWallpaper();
|
| } else {
|
| - bool show_users = true;
|
| - bool result = CrosSettings::Get()->GetBoolean(
|
| - kAccountsPrefShowUserNamesOnSignIn, &show_users);
|
| - DCHECK(result) << "Unable to fetch setting "
|
| - << kAccountsPrefShowUserNamesOnSignIn;
|
| - const chromeos::UserList& users = user_manager->GetUsers();
|
| - if (!show_users || users.empty()) {
|
| - // Boot into sign in form, preload default wallpaper.
|
| - SetDefaultWallpaper();
|
| - return;
|
| - }
|
| -
|
| - if (!disable_boot_animation) {
|
| - // Normal boot, load user wallpaper.
|
| - // If normal boot animation is disabled wallpaper would be set
|
| - // asynchronously once user pods are loaded.
|
| - SetUserWallpaper(users[0]->email());
|
| - }
|
| + InitializeRegisteredDeviceWallpaper();
|
| }
|
| }
|
| return;
|
| @@ -660,6 +641,35 @@ void WallpaperManager::DeleteUserWallpapers(const std::string& email) {
|
| false);
|
| }
|
|
|
| +void WallpaperManager::InitializeRegisteredDeviceWallpaper() {
|
| + if (CrosSettingsProvider::TEMPORARILY_UNTRUSTED ==
|
| + CrosSettings::Get()->PrepareTrustedValues(
|
| + base::Bind(&WallpaperManager::InitializeRegisteredDeviceWallpaper,
|
| + base::Unretained(this)))) {
|
| + return;
|
| + }
|
| + bool disable_boot_animation = CommandLine::ForCurrentProcess()->
|
| + HasSwitch(switches::kDisableBootAnimation);
|
| + bool show_users = true;
|
| + bool result = CrosSettings::Get()->GetBoolean(
|
| + kAccountsPrefShowUserNamesOnSignIn, &show_users);
|
| + DCHECK(result) << "Unable to fetch setting "
|
| + << kAccountsPrefShowUserNamesOnSignIn;
|
| + const chromeos::UserList& users = UserManager::Get()->GetUsers();
|
| + if (!show_users || users.empty()) {
|
| + // Boot into sign in form, preload default wallpaper.
|
| + SetDefaultWallpaper();
|
| + return;
|
| + }
|
| +
|
| + if (!disable_boot_animation) {
|
| + // Normal boot, load user wallpaper.
|
| + // If normal boot animation is disabled wallpaper would be set
|
| + // asynchronously once user pods are loaded.
|
| + SetUserWallpaper(users[0]->email());
|
| + }
|
| +}
|
| +
|
| void WallpaperManager::LoadWallpaper(const std::string& email,
|
| const WallpaperInfo& info,
|
| bool update_wallpaper) {
|
|
|