• Joel Hockey's avatar
    Use crostini::GetTerminalId while switching to Terminal System App · 8709dca6
    Joel Hockey authored
    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: default avatarTimothy Loh <timloh@chromium.org>
    Reviewed-by: default avatarcalamity <calamity@chromium.org>
    Reviewed-by: default avatarNancy Wang <nancylingwang@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#719891}
    8709dca6
crostini_apps.cc 13.5 KB