During ash startup under mash the ash::Shell instance:
1. Builds a pref registry with all the local state prefs it cares about
2. Makes an async connection to Chrome's mojo pref service for local state prefs. I believe this reads the initial values of prefs.
3. An arbitrary amount of time later, ash::Shell::GetLocalStatePrefService becomes non-null and prefs can be used
However, local state prefs are often used for values needed during startup. The most immediate issue is wallpaper average color, see https://chromium-review.googlesource.com/572144, (reverted at https://chromium-review.googlesource.com/594715 due to this issue) and https://chromium-review.googlesource.com/c/595123
This isn't a problem under classic ash, as ash uses a delegate back to chrome to access the local state pref service directly.
For mash, it would be better to have ash defer ash::Shell initialization until the local state pref service is ready. Then ash UI init code could rely on local state prefs being available, like it does in chrome.
Comment 1 by wzang@chromium.org
, Aug 1 2017