[Video Capture Service] Invoke callback even if service connection is lost
This CL is part of the Mojo Video Capture work. Design doc for dev work [1]. Before this CL, the following situation could happen: 1. VideoCaptureManager calls ServiceVideoCaptureProvider::GetDeviceInfosAsync( callback). 2. ServiceVideoCaptureProvider makes a request to the service and waits for an answer 3. The service process crashes (or otherwise loses connection) => |callback| is never run This CL also adds a test for the scenario described above and a fix in the production code. The approach for the fix is to wrap the callback in a media::ScopedCallbackRunner to makes sure that it always gets run. This change required moving some of the Callback types to OnceCallback, which is work we want to do anyway. Bug: 584797 [1] https://docs.google.com/a/chromium.org/document/d/1Qw7rw1AJy0QHXjha36jZNiEuxsxWslJ_X-zpOhijvI8/edit?usp=sharing Change-Id: Id60b6ffd04de4f7118218099cc1ccd437744d5fb Reviewed-on: https://chromium-review.googlesource.com/575786 Commit-Queue: Christian Fremerey <chfremer@chromium.org> Reviewed-by:Taiju Tsuiki <tzik@chromium.org> Reviewed-by:
Emircan Uysaler <emircan@chromium.org> Cr-Commit-Position: refs/heads/master@{#488433}
Showing
Please register or sign in to comment