• David Bokan's avatar
    DataItem Callback Conversion - Test callbacks · 56ca76ea
    David Bokan authored
    This CL is the fist in a series to convert DataItem from the deprecated
    base::Callback (and Bind) to [Once|Repeating]Callback. See the relation
    chain of CLs for the complete change.
    
    This CL starts by converting a set of injectable callbacks used for unit
    tests to observe this class. These callbacks may be called repeatedly
    after being registered so they are RepeatingCallbacks. However,
    ItemFactoryCallback and ItemStoreDeleter both take a callback as a
    parameter. The unit test implementations only invoke these parameters
    once so we convert them to the "Once" variant.
    
    The RegisteredValuesCallback is a type defined in DataItem and used
    elsewhere. For now, we add a "Once" typedef to prevent changing too
    much. This will be removed in a downstream patch once all uses of the
    ambiguous form are removed.
    
    Bug: 1152268
    Change-Id: I694df544b97ede7b1e5aa8af388ca4ed186d8156
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2595932Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
    Commit-Queue: David Bokan <bokan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#838226}
    56ca76ea
data_item.h 5.71 KB