• Sorin Jianu's avatar
    Simplify handling of Component::StateChecking. · a9f02cd1
    Sorin Jianu authored
    This seems to work and no change in the unit tests was needed
    after removing the clutter of how StateChecking::DoHandle works.
    
    High level, the state transitions kNew->kChecking and kChecking->whatever
    don't need to count callbacks. Instead, the code relies on the sequence
    provided by the task runner.
    
    This streamlines the execution path of UpdateEngine::DoUpdateCheck since
    it makes clear that it can't be invoked multiple times during
    a single call to UpdateEngine::Update.
    
    Bug: 1146864
    Change-Id: I116e0f68b6668856aa3c3564ed4f51bf7efd4026
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2523788Reviewed-by: default avatarJoshua Pawlicki <waffles@chromium.org>
    Commit-Queue: Sorin Jianu <sorin@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#825456}
    a9f02cd1
component.h 16.2 KB