Chromium Code Reviews| Index: chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
| diff --git a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
| index ae9d5658b54785dccebd2a9b6c24d4c10a5518a3..5c4fce3c83d250d63225ef92f8d70d6efc836a47 100644 |
| --- a/chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
| +++ b/chrome/browser/chromeos/login/ui/login_display_host_impl.cc |
| @@ -56,6 +56,9 @@ |
| #include "chrome/browser/chromeos/ui/focus_ring_controller.h" |
| #include "chrome/browser/lifetime/application_lifetime.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 "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| #include "chrome/common/chrome_constants.h" |
| #include "chrome/common/chrome_switches.h" |
| @@ -1018,6 +1021,13 @@ void LoginDisplayHostImpl::InitLoginWindowAndView() { |
| params.parent = |
| ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), |
| ash::kShellWindowId_LockScreenContainer); |
|
oshima
2015/09/10 00:20:38
this parent will never have associated profile. Th
|
| + // 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 |
| + // 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); |
| login_window_ = new views::Widget; |
| params.delegate = new LoginWidgetDelegate(login_window_); |
| login_window_->Init(params); |