• Marc Treib's avatar
    Refactor about_sync_util.cc to remove unsafe usage of raw pointers · 0ac3ad8c
    Marc Treib authored
    The previous [Bool|Int|String]SyncStat classes relied on raw pointers
    into base::ListValue, which is bad because they become invalid when
    the actual std::vector backing the list gets resized. They're replaced
    by new SectionList/Section/Stat classes that are less fragile.
    While we're here, this also updates the code to use the new base::Value
    APIs, i.e. using values instead of unique_ptrs.
    
    Bug: 702230
    Change-Id: I5da50857587acb50ffb8849a7fa2cf8dabce9e45
    Reviewed-on: https://chromium-review.googlesource.com/955324
    Commit-Queue: Marc Treib <treib@chromium.org>
    Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#543384}
    0ac3ad8c
about_sync_util.cc 22.1 KB