From 6bdc1b4c7b38e45ee9fb65fbb729ef64dd196ece Mon Sep 17 00:00:00 2001 From: Xiaodan Zhu <zxdan@chromium.org> Date: Wed, 5 Mar 2025 13:53:42 -0800 Subject: [PATCH] coral: missing PWAs in desk template Coral adds app ids from the group to an allow list when creating the desk template. Any apps whose ids are not in the allow list will be filtered. However, the restore data collector is using browser ID as PWA's app id such that all PWAs are filtered out. Test: manual test Bug: b:401024248 Change-Id: I54c25738513b712d1417e75f1947e043674c1165 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6331022 Commit-Queue: Xiaodan Zhu <zxdan@chromium.org> Reviewed-by: Daniel Andersson <dandersson@chromium.org> Cr-Commit-Position: refs/heads/main@{#1428566} --- ash/wm/desks/templates/restore_data_collector.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ash/wm/desks/templates/restore_data_collector.cc b/ash/wm/desks/templates/restore_data_collector.cc index ac7cd95aac3e0..79438ddcadead 100644 --- a/ash/wm/desks/templates/restore_data_collector.cc +++ b/ash/wm/desks/templates/restore_data_collector.cc @@ -62,12 +62,10 @@ void RestoreDataCollector::CaptureActiveDeskAsSavedDesk( continue; } - const std::string app_id = saved_desk_util::GetAppId(window); - // Coral desk templates only contain a subset of the apps on the active // desk. if (template_type == DeskTemplateType::kCoral && - !coral_app_id_allowlist.contains(app_id)) { + !coral_app_id_allowlist.contains(*window->GetProperty(kAppIDKey))) { continue; } @@ -91,6 +89,7 @@ void RestoreDataCollector::CaptureActiveDeskAsSavedDesk( } // Skip windows that do not associate with a full restore app id. + const std::string app_id = saved_desk_util::GetAppId(window); if (!Shell::Get() ->overview_controller() ->disable_app_id_check_for_saved_desks() &&