-
Jason Lin authored
MediaClientImpl needs to register itself as an observer of VmCameraMicManager. Depending on whether the user has customized a flag or not, MediaClientImpl is either constructed before or after `UserSessionInitializer::OnUserSessionStarted(/*is_primary_user*/=true)` is run. The reason seems to be that 1) MediaClientImpl is constructed in a task queue; 2) Customizing a flag causes the browser to be restarted after the user signs in, which changes the execution characteristics. My last attempt (CL 2586286) to fix the registration does not work if the user has customized flags. So, this CL makes VmCameraMicManager a singleton which is always available so that MediaClientImpl can always reliably do the registration in its ctor. Bug: b/167491603 Change-Id: I2b73b59216851f0b8b2533120317e54c98382b45 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2589061 Commit-Queue: Jason Lin <lxj@google.com> Reviewed-by:
Xiyuan Xia <xiyuan@chromium.org> Reviewed-by:
Joel Hockey <joelhockey@chromium.org> Cr-Commit-Position: refs/heads/master@{#836941}
b296c9a2