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

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

Issue 10834081: Enable wallpaper boot animation for boot into sign in too. Add flag to disable it. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: . Created 8 years, 5 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_impl.cc
diff --git a/chrome/browser/chromeos/login/user_manager_impl.cc b/chrome/browser/chromeos/login/user_manager_impl.cc
index 2cdd827c95c3318099e7bf118acb85cbf151108d..a51279348b7f0973e287f982e6c7ff7454084bdc 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.cc
+++ b/chrome/browser/chromeos/login/user_manager_impl.cc
@@ -376,11 +376,18 @@ void UserManagerImpl::EphemeralUserLoggedIn(const std::string& email) {
void UserManagerImpl::InitializeWallpaper() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ if (WizardController::IsZeroDelayEnabled())
+ return;
+
+ bool disable_new_oobe = CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableNewOobe);
+ bool disable_boot_animation = CommandLine::ForCurrentProcess()->
+ HasSwitch(switches::kDisableBootAnimation);
+
if (!IsUserLoggedIn()) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableNewOobe)) {
- if (!WizardController::IsDeviceRegistered() &&
- !WizardController::IsZeroDelayEnabled()) {
+ if (!disable_new_oobe) {
+ if (!WizardController::IsDeviceRegistered()) {
// TODO(nkostylev): Add switch to disable wallpaper transition on OOBE.
// Should be used on test images so that they are not slowed down.
ash::Shell::GetInstance()->desktop_background_controller()->
@@ -392,8 +399,18 @@ void UserManagerImpl::InitializeWallpaper() {
DCHECK(result) << "Unable to fetch setting "
<< kAccountsPrefShowUserNamesOnSignIn;
if (!show_users) {
+ // Boot into sign in form, preload default wallpaper.
ash::Shell::GetInstance()->desktop_background_controller()->
- SetDefaultWallpaper(ash::GetSolidColorIndex());
+ SetDefaultWallpaper(kDefaultOOBEWallpaperIndex);
+ } else if (!disable_boot_animation) {
+ // Normal boot, load user wallpaper.
+ const chromeos::UserList& users = GetUsers();
+ if (!users.empty()) {
+ UserSelected(users[0]->email());
+ } else {
+ ash::Shell::GetInstance()->desktop_background_controller()->
+ SetDefaultWallpaper(kDefaultOOBEWallpaperIndex);
+ }
}
}
}
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.cc ('k') | chrome/browser/chromeos/login/webui_login_display_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698