• Alex Cooper's avatar
    Create SessionRequestData struct for VRService · 850e5fd2
    Alex Cooper authored
    The "RequestSession" flow for a typical VR Session requires bouncing
    calls through a few asynchronous API's via callbacks. Currently there
    are four pieces of data which get constantly passed through these
    callbacks, as they needed at various stages of the request flow.
    
    Unfortunately, since a second "RequestSession" request may come in
    during this asynchronous work, this data cannot just be cached on the
    VRService class.
    
    This change cleans up some of the pattern to make this more readable by
    creating a struct to hold this data, so that only one object needs to
    be consistently forwarded around by the code.
    
    Bug: 1045130
    Change-Id: I4a64eaba2944ddfe4304a20e023acc0100c834f9
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2024267
    Commit-Queue: Alexander Cooper <alcooper@chromium.org>
    Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#736192}
    850e5fd2
vr_service_impl.cc 23.4 KB