• Gil Dekel's avatar
    UI/Display: Simplify and Clean Up ConfigureDisplayTask · 3369eecd
    Gil Dekel authored
    This CL simplifies and cleans up the way ConfigureDisplayTask manages
    its state over sync/async callbacks to reduce complexity and race-risk
    by tightening up the way calls to Run() and OnConfigure() are handled.
    
    In addition, this CL adds a test to ensure that we attempt to
    reconfigure displays when any of them fail, not just the last one.
    
    Finally, it removes ConfigureDisplaysTaskTest.ConfigureWithNoDisplays,
    since this case should never occur in reality.
    
    TEST=display_unittests
    
    Change-Id: Icf34b00205e980df2bb5facbe6da5387a3e9dce3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422559
    Commit-Queue: Gil Dekel <gildekel@chromium.org>
    Reviewed-by: default avatarDaniel Nicoara <dnicoara@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#814355}
    3369eecd
configure_displays_task.cc 7.76 KB