• Paul Miller's avatar
    WebView: Read and write variations seeds · 5204eb18
    Paul Miller authored
    Chrome stores the seed in preferences, but WebView doesn't persist preferences.
    WebView must save save seeds separately. Serialize with protos, and add
    aw_variations_seed.proto to mirror the fields in VariationsSeedFetcher.SeedInfo.
    Since writing might not complete successfully, the file format must make
    truncation unambiguous. The proto wire format is such that truncation in the
    middle of a field will be detected, but truncation between fields is permitted.
    But by requiring in code that all SeedInfo fields are present, any truncated
    seed file will fail to load.
    
    BUG=733857
    
    Change-Id: I7f8d787afed83019c2d891aef419cdf7d593b71c
    Reviewed-on: https://chromium-review.googlesource.com/1033823
    Commit-Queue: Paul Miller <paulmiller@chromium.org>
    Reviewed-by: default avatarBo <boliu@chromium.org>
    Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#555281}
    5204eb18
aw_variations_seed.proto 1.17 KB