• Piotr Pawliczek's avatar
    Delay querying for printers list until the policy file is parsed · 9deda679
    Piotr Pawliczek authored
    A list of enterpise printers is not ready immediately after creation of
    CupsPrintersManager. It caused a problem for testing procedure since from the
    level of autotest_private_api we do not know if the final list is ready or
    there are still some ongoing calculations. A new method called
    OnEnterprisePrintersInitialized() was added to the observer of
    CupsPrintersManager to solve this issue. Also whole code related to
    enterprise printers were refactored, large part of functionality was moved
    from SyncedPrintersManager to new class EnterprisePrintersProvider. Classes
    ExternalPrintersPrefBridge and DeviceExternalPrintersSettingsBridge have been
    merged into one class called CalculatorsPoliciesBinder.
    This is reland of CL:1220547, it fixes the problem detected by the test
    AutotestPrivateApiTest.AutotestPrivate (method execution after destruction
    of CupsPrintersManager object).
    
    BUG=chromium:816996
    TEST=Tested on cave with the use of CL:1451591
    TBR=achuith@chromium.org
    
    Change-Id: I70958421aadd9fab9a2401555bef0dbb28ad5a6a
    Reviewed-on: https://chromium-review.googlesource.com/c/1491909
    Commit-Queue: Piotr Pawliczek <pawliczek@chromium.org>
    Reviewed-by: default avatarSean Kau <skau@chromium.org>
    Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
    Auto-Submit: Piotr Pawliczek <pawliczek@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#636618}
    9deda679
cups_printers_manager_unittest.cc 25.1 KB