Index: chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.cc |
diff --git a/chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.cc |
index 13280a99297fc67053595496affea981ea7754a4..dd171f18fa1c387c4dbe1ad0acd7ceef4253fed0 100644 |
--- a/chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.cc |
+++ b/chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.cc |
@@ -43,14 +43,18 @@ void MultiProfileShellWindowLauncherController::ActiveUserChanged( |
for (ShellWindowList::iterator it = shell_window_list_.begin(); |
it != shell_window_list_.end(); ++it) { |
apps::ShellWindow* shell_window = *it; |
- if (!multi_user_util::IsProfileFromActiveUser(shell_window->profile()) && |
+ Profile* profile = |
+ Profile::FromBrowserContext(shell_window->browser_context()); |
+ if (!multi_user_util::IsProfileFromActiveUser(profile) && |
IsRegisteredApp(shell_window->GetNativeWindow())) |
UnregisterApp(shell_window->GetNativeWindow()); |
} |
for (ShellWindowList::iterator it = shell_window_list_.begin(); |
it != shell_window_list_.end(); ++it) { |
apps::ShellWindow* shell_window = *it; |
- if (multi_user_util::IsProfileFromActiveUser(shell_window->profile()) && |
+ Profile* profile = |
+ Profile::FromBrowserContext(shell_window->browser_context()); |
+ if (multi_user_util::IsProfileFromActiveUser(profile) && |
!IsRegisteredApp(shell_window->GetNativeWindow())) |
RegisterApp(*it); |
} |
@@ -69,7 +73,9 @@ void MultiProfileShellWindowLauncherController::OnShellWindowAdded( |
if (!ControlsWindow(shell_window->GetNativeWindow())) |
return; |
shell_window_list_.push_back(shell_window); |
- if (multi_user_util::IsProfileFromActiveUser(shell_window->profile())) |
+ Profile* profile = |
+ Profile::FromBrowserContext(shell_window->browser_context()); |
+ if (multi_user_util::IsProfileFromActiveUser(profile)) |
RegisterApp(shell_window); |
} |