Commit f35bd178 authored by Nicholas Verne's avatar Nicholas Verne Committed by Commit Bot

Check Crostini UI allowed before launching apps.

It is possible for Crostini apps to be disallowed by policy. This can change
at any time for a give machine, so we always need to check.

While the pinning bug is still happening, we also need this as a failsafe.

Bug: 881681
Change-Id: I2e2497ef9cdaee7f989d38931a88886d52535cf9
Reviewed-on: https://chromium-review.googlesource.com/1212373Reviewed-by: default avatarTimothy Loh <timloh@chromium.org>
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589441}
parent 72bcd29b
......@@ -266,6 +266,10 @@ void LaunchCrostiniApp(Profile* profile,
const std::string& app_id,
int64_t display_id,
const std::vector<std::string>& files) {
// Policies can change under us, and crostini may now be forbidden.
if (!IsCrostiniUIAllowedForProfile(profile)) {
return;
}
auto* crostini_manager = crostini::CrostiniManager::GetForProfile(profile);
crostini::CrostiniRegistryService* registry_service =
crostini::CrostiniRegistryServiceFactory::GetForProfile(profile);
......
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