• Tommy Li's avatar
    [omnibox] Slight refactors to AutocompleteController::in_start_ · c36fbf82
    Tommy Li authored
    This makes some minor refactors to the usage of
    AutocompleteController::in_start_.
    
     1. It delays setting it to false until after the UpdateResult call
        within the synchronous pass. This is more accurate, and also allows
        in_start_ to be used as a synonoym of in_synchronous_pass_.
    
     2. It also moves in_start_ to be an early exit condition for
        OnProviderUpdate. It likely doesn't need to be checked there at
        all, since the comments indicate it's likely ALWAYS false when
        OnProviderUpdate is called.
    
    These refactors help pave the way for the feature to preserve the
    default match during the asynchronous pass, by clarifying in the code
    when the synchronous vs. asynchronous pass occurs.
    
    Bug: 398135
    Change-Id: I8f8c61b8233b1c049338dac448b6ef8f1b0e3b93
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1789823Reviewed-by: default avatarKevin Bailey <krb@chromium.org>
    Commit-Queue: Tommy Li <tommycli@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#694850}
    c36fbf82
clipboard_provider.cc 13.3 KB