Chromium Code Reviews| Index: chrome/browser/chromeos/login/ui/lock_window_aura.cc |
| diff --git a/chrome/browser/chromeos/login/ui/lock_window_aura.cc b/chrome/browser/chromeos/login/ui/lock_window_aura.cc |
| index 83d35260e65ca6e30ff10f8293b19bbb5613b05f..cff6a7b33d4c316ba96894ba87e7943e96728268 100644 |
| --- a/chrome/browser/chromeos/login/ui/lock_window_aura.cc |
| +++ b/chrome/browser/chromeos/login/ui/lock_window_aura.cc |
| @@ -7,6 +7,10 @@ |
| #include "ash/shell.h" |
| #include "ash/shell_window_ids.h" |
| #include "base/command_line.h" |
| +#include "chrome/browser/profiles/profile_manager.h" |
| +#include "chrome/browser/themes/theme_service.h" |
| +#include "chrome/browser/themes/theme_service_factory.h" |
| +#include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
| #include "ui/aura/window.h" |
| #include "ui/aura/window_event_dispatcher.h" |
| @@ -61,6 +65,13 @@ void LockWindowAura::Init() { |
| params.parent = |
| ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), |
| ash::kShellWindowId_LockScreenContainer); |
| + // On login screen and logged in as an anonymous user you might not get a |
| + // profile. Which indicates that multi-user is not active and an anonymous |
|
tdanderson
2015/09/09 17:38:58
nit: change . to , between first two sentences (he
|
| + // profile is in use. Take the active profile to find the theme. |
| + Profile* profile = multi_user_util::GetProfileFromWindow(params.parent); |
| + if (!profile) |
| + profile = ProfileManager::GetActiveUserProfile(); |
| + params.theme_provider = ThemeServiceFactory::GetForProfile(profile); |
| views::Widget::Init(params); |
| SetVisibilityAnimationTransition(views::Widget::ANIMATE_NONE); |
| } |