Use crostini::GetTerminalId while switching to Terminal System App
GetTerminalId will return the old terminal ID or the new Terminal System App ID if the feature is on. This allows the new Terminal app to have the same launch and shelf context menu items. ExtensionApps is modified to not register TerminalSystemApp since it will be registered as a crostini app by CrostiniRegistryService. This will change once System Apps support hiding apps. See crbug.com/1028898 Added on_initilized() OneShotEvent to AppListSyncableService so that callbacks can be registered to run after initialization. CrostiniRegistryService::MigrateTerminal removes old terminal from registry and registers on_initialized() callback with AppListSyncableService to copy attributes from old terminal to new. MigrateTerminal will be removed after a few releases once the TerminalSystemApp feature is removed. Bug: 1019021 Bug: 1028898 Change-Id: Ic35488bf8606a17a8806925dfa31ed0310cc9367 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1925833 Commit-Queue: Joel Hockey <joelhockey@chromium.org> Reviewed-by:Timothy Loh <timloh@chromium.org> Reviewed-by:
calamity <calamity@chromium.org> Reviewed-by:
Nancy Wang <nancylingwang@chromium.org> Reviewed-by:
Xiyuan Xia <xiyuan@chromium.org> Cr-Commit-Position: refs/heads/master@{#719891}
Showing
Please register or sign in to comment