Right now mash connects to the wrong pref service on startup (the temporary login profile) and doesn't change pref services on multiprofile switch. I'm fixing that with a suggestion from sammc with https://chromium-review.googlesource.com/c/590356/
However, it's not best solution. With that CL if you switch users with multiprofile there is a time window between when ash has been informed of the switched (and fired SessionObserver::OnActiveUserSessionChanged) and when ash has connected to the new user's profile pref service.
This makes the code more complex -- code that modifies prefs has to check for null PrefService* and it's not clear what to do if you want to write a pref during the null time window.
It would be easier to reason about things if the user switch and pref service switch were atomic.
Suggestions on how to do this? Maybe someone more familiar than me with pref service and/or session state could take this on?
Comment 1 by jamescook@chromium.org
, Aug 1 2017Status: Assigned (was: Untriaged)