• Hidehiko Abe's avatar
    Lacros initialization with out-band file. · 2222a4c5
    Hidehiko Abe authored
    Currently, startup data is passed from ash-chrome to lacros-chrome
    via LacroChromeService::Init() Mojo call. This requires Mojo initialization
    so that the data is available only after that.
    However, there are some needs that the data would like to be available
    earlier.
    
    In order to support that situation, this CL introduces another approach,
    where ash-chrome dumps the serialized data into a memory backed file
    and lacros-chrome inherits its file descriptor.
    
    For backward compatibility, both lacros-chrome and ash-chrome supports
    older protocol, i.e. LacrosChromeService::Init() for now,
    while it is now deprecated.
    Thus, any {old,new} {lacros-chrome,ash-chrome} combination should work.
    It is planned to remove the older protocol support, when newer/older
    chromes are distributed enough.
    
    BUG=1155494
    TEST=Ran tryjob. Ran {old,new} {lacros-chrome,ash-chrome} combinations
         on DUTs to make sure lacros-chrome can be launched successfully
         via Shelf icon and mojo_connection_lacros_launcher.py script.
    
    Change-Id: I09c7004d07cec9a58ccfc7ee24c0e256149e4951
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2573264
    Commit-Queue: Hidehiko Abe <hidehiko@chromium.org>
    Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
    Reviewed-by: default avatarYuke Liao <liaoyuke@chromium.org>
    Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
    Reviewed-by: default avatarMattias Nissler <mnissler@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#835744}
    2222a4c5
startup_switches.cc 433 Bytes