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

Unified Diff: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc

Issue 2325743002: arc: Disable shelf item creation when secondary user is active. (Closed)
Patch Set: Created 4 years, 3 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: chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
diff --git a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
index 9b07b992e3edc7364e34aaea0999770d9fb609fe..5c2385a4bb923a683400e87492823081ea78e7b3 100644
--- a/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
+++ b/chrome/browser/ui/ash/launcher/arc_app_window_launcher_controller.cc
@@ -299,7 +299,7 @@ void ArcAppWindowLauncherController::OnWindowVisibilityChanging(
aura::Window* window,
bool visible) {
// The application id property should be set at this time.
- if (visible)
+ if (visible && observed_profile_ == owner()->GetProfile())
AttachControllerToWindowIfNeeded(window);
}
@@ -421,6 +421,10 @@ void ArcAppWindowLauncherController::OnTaskCreated(
task_id_to_shelf_app_id_[task_id] = GetShelfAppIdFromArcAppId(
ArcAppListPrefs::GetAppId(package_name, activity_name));
+ // Don't create shelf icon for non-primary user.
+ if (observed_profile_ != owner()->GetProfile())
+ return;
+
AttachControllerToWindowsIfNeeded();
}

Powered by Google App Engine
This is Rietveld 408576698