[Video Capture, Chrome OS] Fix a race of ProcessDevicesChanged()
We need to wait until |camera_info_| is updated in
OnGotCameraInfoOnIpcThread() before we fire ProcessDevicesChanged() to
prevent the race condition.
To easily reproduce the race without this CL, add
--disable-features=MojoVideoCapture as the command line argument of
Chrome.
BUG=b:118418068,b:118408452,b:64996728,b:77833131
TEST=10.times do
Plug the external camera
Check the external camera is shown in settings
Unplug the extencal camera
Check the external camera is not shown in settings
end
Change-Id: I3774c456099724f2bb5ac2d21caf3229d0045a4e
Reviewed-on: https://chromium-review.googlesource.com/c/1345677Reviewed-by:
Ricky Liang <jcliang@chromium.org>
Commit-Queue: Shik Chen <shik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609934}
Showing
Please register or sign in to comment