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

Clarify logic for showing CrostiniInstallerView.

This code now avoids a redundant check of crostini UI allowed.

Bug: None
Change-Id: I34c15883eccb2446b4cab0388ca479c7203ed65e
Reviewed-on: https://chromium-review.googlesource.com/c/1325273Reviewed-by: default avatarRenée Wright <rjwright@chromium.org>
Commit-Queue: Nicholas Verne <nverne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606353}
parent 4b630b4e
...@@ -315,8 +315,9 @@ void LaunchCrostiniApp(Profile* profile, ...@@ -315,8 +315,9 @@ void LaunchCrostiniApp(Profile* profile,
DCHECK(files.empty()); DCHECK(files.empty());
RecordAppLaunchHistogram(CrostiniAppLaunchAppType::kTerminal); RecordAppLaunchHistogram(CrostiniAppLaunchAppType::kTerminal);
// At this point, we know that Crostini UI is allowed.
if (!crostini_manager->IsCrosTerminaInstalled() || if (!crostini_manager->IsCrosTerminaInstalled() ||
!IsCrostiniEnabled(profile)) { !profile->GetPrefs()->GetBoolean(crostini::prefs::kCrostiniEnabled)) {
ShowCrostiniInstallerView(profile, CrostiniUISurface::kAppList); ShowCrostiniInstallerView(profile, CrostiniUISurface::kAppList);
return; return;
} }
......
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