• Justin Carlson's avatar
    Refactor ServiceDiscoveryDeviceLister. · b20a4341
    Justin Carlson authored
    This change does two things.  First, it splits out the implementation
    of ServiceDiscoveryDeviceLister from the interface, which will allow
    users of the API to mock/fake it for testing.
    
    Second, it adds a service_type parameter to
    ServiceDiscoveryDeviceLister::Delegate::OnDeviceCacheFlushed.  This
    allows users of the class that want to manage multiple service types
    with a single Delegate to disambiguate which service is being flushed.
    The other Delegate functions already pass in the service description
    so don't need any additional information for this use.
    
    Also fixup callsites for all users of this API.
    
    Bug: 808157
    Change-Id: I9cf4b23692f54c66e0224e06df1769f750f846b3
    Reviewed-on: https://chromium-review.googlesource.com/898184
    Commit-Queue: Justin Carlson <justincarlson@chromium.org>
    Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
    Reviewed-by: default avatarGene Gutnik <gene@chromium.org>
    Reviewed-by: default avatarmark a. foltz <mfoltz@chromium.org>
    Reviewed-by: default avatarSean Kau <skau@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#534146}
    b20a4341
cast_device_provider.h 2.38 KB