• derat's avatar
    chromeos: Fix renderer-freezing race during aborted suspend. · 7e1b5a3c
    derat authored
    Fix a (long-standing?) race where
    chromeos::PowerManagerClient could notify RendererFreezer
    that a suspend attempt was imminent *after* already telling
    it that the attempt was done.
    
    Also make PowerManagerClient not notify powerd about regular
    or dark suspend readiness after it's already seen a
    SuspendDone signal.
    
    Add a bunch of unit tests exercising this code, too, and
    rework the comments on some previously-added tests.
    
    BUG=646912
    
    Review-Url: https://codereview.chromium.org/2340153002
    Cr-Commit-Position: refs/heads/master@{#418887}
    7e1b5a3c
power_manager_client.cc 31.3 KB