Chromium Code Reviews| 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..1c7407a43b59b147e814b635ce93b955a473c1cf 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( |
|
Nikita (slow)
2012/12/11 13:16:39
nit: either move 2 spaces to the left or 2 spaces
bshe
2012/12/11 14:36:17
Done. Moved 2 spaces to the left.
|
| + base::Bind(&WallpaperManager::InitializeRegisteredDeviceWallpaper, |
| + base::Unretained(this)))) { |
| + return; |
|
Nikita (slow)
2012/12/11 13:16:39
nit: 2 spaces indent here.
bshe
2012/12/11 14:36:17
Done.
|
| + } |
| + 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) { |