• Piotr Pawliczek's avatar
    Enterprise Printers: Bugfix for missing printers (Device and User policies) · dd4c3e1e
    Piotr Pawliczek authored
    Since M-78, external policies are initialized after CupsPrintersManager. It
    causes a problem with Enterprise Printers, because BulkPrinterCalculators are
    created during external policies initialization. Since M-78,
    EnterprisePrintersProvider (started by CupsPrintersManager) cannot find
    objects of BulkPrinterCalculators and always returns empty list of printers.
    This patch solves this problem by changing the lifetime of
    BulkPrintersCalculator. From now, each BulkPrintersCalculator is created by
    the first object that asks for it.
    Some unittests require that BulkPrintersCalculator are deleted at the end of
    each unittest. The patch solving that problem is in CL:1836660.
    
    BUG=chromium:1010289,chromium:1009062
    TEST=on nautilus
    
    Change-Id: Ie9b06f05a67f028204230b6b84162a058457fbd4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1838051Reviewed-by: default avatarSergey Poromov <poromov@chromium.org>
    Reviewed-by: default avatarSean Kau <skau@chromium.org>
    Commit-Queue: Piotr Pawliczek <pawliczek@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#703123}
    dd4c3e1e
calculators_policies_binder.cc 7.19 KB