Commit 420f7419 authored by tnagel@chromium.org's avatar tnagel@chromium.org

Remove "if (WallpaperManager::Get())" from MultiUserWindowManagerChromeOS::TransitionWallpaper()

chromeos::WallpaperManager::Get() either returns true or it returns not at all,
thus the if(...) can be safely removed.

BUG=none

Review URL: https://codereview.chromium.org/189913011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@255989 0039d316-1c4b-4281-b951-d872f2087c98
parent bc5844e5
......@@ -662,20 +662,18 @@ void MultiUserWindowManagerChromeOS::TransitionUser(
void MultiUserWindowManagerChromeOS::TransitionWallpaper(
MultiUserWindowManagerChromeOS::AnimationStep animation_step) {
// Handle the wallpaper switch.
if (chromeos::WallpaperManager::Get()) {
ash::UserWallpaperDelegate* wallpaper_delegate =
ash::Shell::GetInstance()->user_wallpaper_delegate();
if (animation_step == HIDE_OLD_USER) {
// Set the wallpaper cross dissolve animation duration to our complete
// animation cycle for a fade in and fade out.
wallpaper_delegate->SetAnimationDurationOverride(2 * kUserFadeTimeMS);
chromeos::WallpaperManager::Get()->SetUserWallpaperDelayed(
current_user_id_);
} else {
// Revert the wallpaper cross dissolve animation duration back to the
// default.
wallpaper_delegate->SetAnimationDurationOverride(0);
}
ash::UserWallpaperDelegate* wallpaper_delegate =
ash::Shell::GetInstance()->user_wallpaper_delegate();
if (animation_step == HIDE_OLD_USER) {
// Set the wallpaper cross dissolve animation duration to our complete
// animation cycle for a fade in and fade out.
wallpaper_delegate->SetAnimationDurationOverride(2 * kUserFadeTimeMS);
chromeos::WallpaperManager::Get()->SetUserWallpaperDelayed(
current_user_id_);
} else {
// Revert the wallpaper cross dissolve animation duration back to the
// default.
wallpaper_delegate->SetAnimationDurationOverride(0);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment