• Justin Miron's avatar
    Expand PageLoadMetricsObserverDelegate API to cover PageLoadExtraInfo · 6825091a
    Justin Miron authored
    This allows observers to access page load info from the metrics
    observer delegate directly, instead of being passed the
    PageLoadExtraInfo struct by the delegate. Previously the entire
    PageLoadExtraInfo struct was created and passed independent of the
    data needed by the observers. This also removes the duplication of
    delegate and PageLoadExtraInfo fields (navigation_start, did commit).
    
    Each API function returns the same data as used to populate the
    PageLoadExtraInfo struct.
    
    This API will be followed up with the following sets of CLs:
    1. Replace common observer utility functions to use the delegate
       returned values instead of the PageLoadExtraInfo struct.
    2. Group page_load_metrics_observer On* functions that use
       PageLoadExtraInfo structs and replace them with delegate returned
       values.
    
    This also adds first_background_time and first_foreground_time as
    members of the page_load_tracker, so as to not compute these with
    each call to their respective getter function.
    
    BUG=939403
    
    Change-Id: I84af9f19fc2d14a727318ea2eb0668229f795cc3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1713153
    Commit-Queue: Justin Miron <justinmiron@google.com>
    Reviewed-by: default avatarBryan McQuade <bmcquade@chromium.org>
    Reviewed-by: default avatarJohn Delaney <johnidel@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#681813}
    6825091a
page_load_tracker.cc 32.1 KB