• Maksim Moskvitin's avatar
    Support kestore keys migration from prefs to USS storage · 308a86cd
    Maksim Moskvitin authored
    Directory implementation stores keystore keys in sync prefs. Since
    missing keystore keys from the response are possible and can cause
    significant sync issues (such as infinite configuration sync cycles),
    it's worth to support their migration.
    
    Packed keystore keys are propagated through the bridge constructor
    and passed to SetKeystoreKeys() if following conditions satisfied:
    1. There are some keystore keys in preferences.
    2. There is no errors during unpacking keystore keys.
    3. Bridge didn't yet received any keystore keys (i.e. they weren't
    restored from Nigori storage).
    
    Bug: 1030736, 922900
    Change-Id: I4419da22dbe010e226dae61fdc4164d3a37b5e20
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1950946
    Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#721614}
    308a86cd
sync_engine_backend.cc 27.8 KB