Convert FontMatchingMetrics to share key and value types in its HashMaps
Currently, each HashMap uses a unique type to represent each key and value. These types are then converted to IdentifiableTokens just before metrics are recorded. These types (mainly structs) can be confusing, with fields remaining unused in certain code paths. We convert FontMatchingMetrics to instead use an IdentifiableToken as both its key and value, simplifying the work at publish time and improving readability. To enable its use as a key, the IdentifiableToken is wrapped in a simple struct. This change does not change functionality, although the change in token generation method will affect the exact hashes recorded. This new approach will simplify a future refactor that does make functional changes (see crrev.com/c/2376037). Bug: 1121669 Change-Id: I6c7ba2b6f42c62d7ae007d2c9b9519323edc24cf Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2388002 Commit-Queue: Alex Turner <alexmt@chromium.org> Reviewed-by:Dominik Röttsches <drott@chromium.org> Reviewed-by:
Asanka Herath <asanka@chromium.org> Cr-Commit-Position: refs/heads/master@{#803978}
Showing
Please register or sign in to comment