• Michael Giuffrida's avatar
    Expose WindowFeatures for logging and ML · 8e759628
    Michael Giuffrida authored
    WindowActivityWatcher logs the WindowMetrics UKM event for a browser
    window, with features like window show state and tab count.
    
    Replace the WindowMetrics struct with a public WindowFeatures struct.
    The UKM logging function forwards info from the new struct to the
    UKM event.
    
    Later we will use the same CreateWindowFeatures function 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, and makes the inferencing CL smaller.
    
    Bug: 791824
    Change-Id: I940b7fc3d9b6d71d2c23f3a6b054b4f0eb74894a
    Reviewed-on: https://chromium-review.googlesource.com/1028563
    Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
    Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#555287}
    8e759628
BUILD.gn 174 KB