Separate TabMetrics data from logging
TabMetricsLogger logs the TabMetrics UKM event for a background tab. This event includes the state of the tab, as well as some slightly tricky or nullable fields. Add a new TabFeatures struct that contains all this information, and generate the struct in a separate function. The UKM logging function now simply forwards info from the TabFeatures struct to the UKM event. Later we will use the same TabFeatures to calculate tab scores with an ML model. Encapsulating the logic for these features in a single function ensures that we use the same logic for logging as we will for inference. Bug: 784639, 783989 Change-Id: I11e64119ce30465f98409f54f7e97af0251ce4b3 Reviewed-on: https://chromium-review.googlesource.com/1028562 Commit-Queue: Michael Giuffrida <michaelpg@chromium.org> Reviewed-by:François Doray <fdoray@chromium.org> Cr-Commit-Position: refs/heads/master@{#554694}
Showing
Please register or sign in to comment