• Justin Carlson's avatar
    Change PpdProvider API to make it discovery friendly. · 97bf1add
    Justin Carlson authored
    This changes two main things.  First, and most significantly, the
    way we resolve a PpdReference is unified -- instead of trying
    a make-and-model string or trying usb ids, now we have a single
    function to which you supply everything you know about the printer
    and it gives you back a PpdReference or a failure.
    
    Second, the way we support UI make, model listings changes.  When
    the user asks for a list of supported printers from a manufacturer,
    instead of getting back just the names, now the api returns the
    names paired with the corresponding PpdReference.  Before, the
    user had to call back into the ppd provider to get the reference, which
    meant we had a weird "have to call this before that" sort of constraint
    which this removes.
    
    All callsites and tests updated as well.
    
    Bug: 744996
    Change-Id: Ied385c087e4c3d6c1b21b924fcea772c786074c5
    Reviewed-on: https://chromium-review.googlesource.com/580007
    Commit-Queue: Justin Carlson <justincarlson@chromium.org>
    Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Reviewed-by: default avatarSean Kau <skau@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#488716}
    97bf1add
ppd_provider_unittest.cc 24.3 KB