Skip to content

Commit

Permalink
lacros: Temporary workaround for broken ProfilePicker.
Browse files Browse the repository at this point in the history
When Lacros is launched with InitialBrowserAction::kDoNotOpenWindow, no
window is shown. This is implemented as a conditional in
StartupBrowserCreator. Unfortunately, the ProfilePicker also uses the
StartupBrowserCreator. This means that when Lacros is launched with this
flag, the ProfilePicker is unusable. Unfortunately, the ProfilePicker is
sometimes the first and only window launched -- which renders Lacros
unusable.

This CL temporarily and intentionally breaks the implementation of
InitialBrowserAction::kDoNotOpenWindow.

Bug: 1278549
Change-Id: If2dde287a6e474848f418647414ad469864e07ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3328770
Quick-Run: Erik Chen <erikchen@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#950377}
  • Loading branch information
erikchen authored and Chromium LUCI CQ committed Dec 10, 2021
1 parent 0a916bf commit 9d78afd
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions chrome/browser/ui/startup/startup_browser_creator_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,10 @@ bool StartupBrowserCreatorImpl::ShouldLaunch(
return false;

#if BUILDFLAG(IS_CHROMEOS_LACROS)
// Don't open any browser windows if Ash requested that Lacros not do so. The
// implicit assumption is that some other code is responsible for keeping
// Lacros running in the background
if (chromeos::LacrosService::Get() &&
chromeos::LacrosService::Get()->init_params()->initial_browser_action ==
crosapi::mojom::InitialBrowserAction::kDoNotOpenWindow) {
return false;
}
// Don't open any browser windows if Ash requested that Lacros not do so.
// The implicit assumption is that some other code is responsible for
// keeping Lacros running in the background.
// Temporarily remove this logic to deal with https://crbug.com/1278549.
#endif

#if BUILDFLAG(IS_CHROMEOS_ASH)
Expand Down

0 comments on commit 9d78afd

Please sign in to comment.