• Pavol Marko's avatar
    Make PlatformKeysServiceImpl independent of BrowserContext/Profile · bdc2ca3d
    Pavol Marko authored
    This change makes PlatformKeysServiceImpl independent of
    BrowserContext/Profile.
    All BrowserContext-specific calls have been extracted into a
    PlatformKeysServiceImplDelegate.
    
    This has the advantage that for device-wide usage of the
    PlatformKeysService, a delegate can be created which does not depend on
    a Profile (avoiding using the sign-in Profile for that use case).
    The CertProvisioningScheduler use case has been migrated to this
    pattern.
    
    As the device-wide PlatformKeysService lives "forever" but the
    underlying system token NSSCertDatabase does not, PlatformKeysService
    can now explicitly "shut down" when the underlying NSSCertDatabase is
    being destroyed. After it is shut down all operations on the
    PlatformKeysService will fail with an error (except for removing
    observers).
    
    Note: The PlatformKeysService still works for the sign-in Profile
    which is important for the sign-in screen extensions use case.
    
    Bug: 1045895, 1073512
    Test: browser_tests
    Change-Id: I09b855c61caaa744bf8618073eaa2854a609df84
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2188633
    Commit-Queue: Pavol Marko <pmarko@chromium.org>
    Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
    Reviewed-by: default avatarAchuith Bhandarkar <achuith@chromium.org>
    Reviewed-by: default avatarMichael Ershov <miersh@google.com>
    Cr-Commit-Position: refs/heads/master@{#790397}
    bdc2ca3d
system_token_cert_db_initializer.cc 8.87 KB