Commit 3d79d513 authored by Nicholas Verne's avatar Nicholas Verne Committed by Commit Bot

Restrict crostini UI to primary profile

Crostini multiprofile support is going to wait until the successor for
multiprofile is landed on ChromeOS. Until then, we restrict Crostini to the
primary (i.e. first signed in) profile per session. This means that you can
still have Linux containers per profile, but to use then you need to sign out
then sign in to the desired profile.

Note, this prevents UI from being shown to the non-primary profile. It doesn't
prevent non-primary users from using crosh and vmc.

Bug: 842561
Change-Id: I119359b332e7a3afa02071c1e9d9e6f41164fe4d
Reviewed-on: https://chromium-review.googlesource.com/1058738
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Reviewed-by: default avatarTimothy Loh <timloh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558627}
parent 8c6f4dc5
...@@ -73,9 +73,7 @@ bool IsCrostiniAllowed() { ...@@ -73,9 +73,7 @@ bool IsCrostiniAllowed() {
} }
bool IsCrostiniUIAllowedForProfile(Profile* profile) { bool IsCrostiniUIAllowedForProfile(Profile* profile) {
if (!profile || profile->IsOffTheRecord() || if (!chromeos::ProfileHelper::IsPrimaryProfile(profile)) {
chromeos::ProfileHelper::IsEphemeralUserProfile(profile) ||
chromeos::ProfileHelper::IsLockScreenAppProfile(profile)) {
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment