Skip to content

Commit

Permalink
Show reason in logs when crostini is not allowed
Browse files Browse the repository at this point in the history
(cherry picked from commit ebaed9a)

Change-Id: I975d1b0af0f2824314b38fdb37ad9bdaaa2d81e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2741878
Reviewed-by: Joel Hockey <joelhockey@chromium.org>
Reviewed-by: Jason Lin <lxj@google.com>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#860617}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2738579
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/branch-heads/4430@{#214}
Cr-Branched-From: e5ce7dc-refs/heads/master@{#857950}
  • Loading branch information
Joel Hockey authored and Chromium LUCI CQ committed Mar 8, 2021
1 parent 80bfe84 commit e838512
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chrome/browser/chromeos/crostini/crostini_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,9 @@ void LaunchCrostiniApp(Profile* profile,
const std::vector<LaunchArg>& args,
CrostiniSuccessCallback callback) {
// Policies can change under us, and crostini may now be forbidden.
if (!CrostiniFeatures::Get()->IsAllowedNow(profile)) {
std::string reason;
if (!CrostiniFeatures::Get()->IsAllowedNow(profile, &reason)) {
LOG(ERROR) << "Crostini not allowed: " << reason;
return std::move(callback).Run(false, "Crostini UI not allowed");
}
auto* crostini_manager = crostini::CrostiniManager::GetForProfile(profile);
Expand Down

0 comments on commit e838512

Please sign in to comment.