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

Unified Diff: trunk/src/chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.cc

Issue 163913004: Revert 250826 "Remove Profile dependency from apps::ShellWindow" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 10 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: trunk/src/chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.cc
===================================================================
--- trunk/src/chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.cc (revision 251093)
+++ trunk/src/chrome/browser/ui/ash/launcher/multi_profile_shell_window_launcher_controller.cc (working copy)
@@ -43,18 +43,14 @@
for (ShellWindowList::iterator it = shell_window_list_.begin();
it != shell_window_list_.end(); ++it) {
apps::ShellWindow* shell_window = *it;
- Profile* profile =
- Profile::FromBrowserContext(shell_window->browser_context());
- if (!multi_user_util::IsProfileFromActiveUser(profile) &&
+ if (!multi_user_util::IsProfileFromActiveUser(shell_window->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;
- Profile* profile =
- Profile::FromBrowserContext(shell_window->browser_context());
- if (multi_user_util::IsProfileFromActiveUser(profile) &&
+ if (multi_user_util::IsProfileFromActiveUser(shell_window->profile()) &&
!IsRegisteredApp(shell_window->GetNativeWindow()))
RegisterApp(*it);
}
@@ -73,9 +69,7 @@
if (!ControlsWindow(shell_window->GetNativeWindow()))
return;
shell_window_list_.push_back(shell_window);
- Profile* profile =
- Profile::FromBrowserContext(shell_window->browser_context());
- if (multi_user_util::IsProfileFromActiveUser(profile))
+ if (multi_user_util::IsProfileFromActiveUser(shell_window->profile()))
RegisterApp(shell_window);
}

Powered by Google App Engine
This is Rietveld 408576698