From 9d78afd581e334913f1145fc7789c9163704efb8 Mon Sep 17 00:00:00 2001 From: Erik Chen Date: Fri, 10 Dec 2021 01:42:10 +0000 Subject: [PATCH] lacros: Temporary workaround for broken ProfilePicker. 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 Reviewed-by: Scott Violet Commit-Queue: Erik Chen Cr-Commit-Position: refs/heads/main@{#950377} --- .../ui/startup/startup_browser_creator_impl.cc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc index de33d5390c1791..c8421f4528b25e 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc @@ -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)