• Mikel Astiz's avatar
    Refactor bookmark GUID-matching logic · afc87701
    Mikel Astiz authored
    Prior to this patch, the two existing functions to build GUID-keyed maps
    were heavily coupled and there were fragile underlying assumptions that
    made it work (e.g. there were potentially entries in
    |guid_to_remote_node_map_| that didn't actually match any local GUID).
    
    Instead, let's centralize the matching logic into one single function,
    and adopt a unified map to represent the matches. This simplifies the
    code and enforces more strict invariants without the need for DCHECKs.
    
    Bug: 978430
    Change-Id: Ieea0db8d43376e204b793dcc64b2dc84d521b289
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929216
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Reviewed-by: default avatarMohamed Amir Yosef <mamir@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#718580}
    afc87701
bookmark_specifics_conversions.cc 11.8 KB