0
Files
src/apps
James Cook c3ca9d9b66 lacros: Pass download and documents dir to lacros via LacrosInitParams
After discussion with security team and the files team, we want to
avoid using hard-coded /home/chronos/user/MyFiles paths in lacros.

Instead, have ash-chrome pass the paths to lacros-chrome at startup
over mojo. This also avoids making the exact path an implicit API
contract between ash and lacros. If a future Chrome OS release moves
the directories to new locations, lacros will follow along.

Ash currently uses /home/chronos/u-<hash> for paths. The security folks
would like to switch to /home/user/<hash>, but ash doesn't use those
yet. Once ash switches, lacros will automatically follow.

We have to leave a few references to /home/chronos/user in lacros for
now, until we drop support for Chrome OS M89 and can be sure that ash
always sends the default paths. crbug.com/1150702 tracks clean up.

Because unit tests are not launched by ash, we override the default
paths for documents and downloads in the test harness, to simulate
how ash launches lacros in production.

Bug: 1150575
Test: added to unit_tests

Change-Id: Ifcf637dcbdcb91fa5bb7f3b81c161e3ce87c7e56
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495961
Commit-Queue: James Cook <jamescook@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829903}
2020-11-21 01:13:07 +00:00
..