Refactor bookmark GUID-matching logic
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:Mohamed Amir Yosef <mamir@chromium.org> Cr-Commit-Position: refs/heads/master@{#718580}
Showing
Please register or sign in to comment