[Structured metrics] Refactor UMA proto population logic
We have logic for populating a ChromeUserMetricsExtension proto from JSON storage. This will soon be used in two places, so this CL moves it into its own function. While I'm here, I've also cleaned up the logic a little and added some extra safety to prevent us from crashing chrome in the case of an unexpected JSON format. I've also removed a TODO that isn't relevant anymore. Bug: 1148168 Change-Id: Iedcb514ae950f6a6ffec3690ddc7a82ba0b7616b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2536421 Commit-Queue: Tony Yeoman <tby@chromium.org> Reviewed-by:Thanh Nguyen <thanhdng@chromium.org> Cr-Commit-Position: refs/heads/master@{#827705}
Showing
Please register or sign in to comment