• Uttam Thakore's avatar
    Send local network request information to UMA and UKM · 54c314a5
    Uttam Thakore authored
    We are implementing new UMA and UKM metric collection for local network requests by public and private pages.
    
    This CL creates a new subclass of page_load_metrics::PageLoadMetricsObserver, LocalNetworkRequestsMetricsPageLoadObserver, to monitor pages for local network requests and report them to UMA and UKM. It also includes unit tests for the new metric collection classes.
    
    Additionally, this CL adds the ability to specify the socket address for a navigation to content::NavigationSimulator, which is needed for LocalNetworkRequestsPageLoadMetricsObserver's unit tests, which require manipulation of the address of committed page loads to test the observer's functionality. (Note that this change is included in this CL because content/ policy requires that changes to the public API must have a caller outside content/.)
    
    Concretely, this CL does the following:
    (1) Creates the LocalNetworkRequestsPageLoadMetricsObserver class, which implements local network request UKM and UMA metric collection.
    (2) Registers the LocalNetworkRequestsPageLoadMetricsObserver in PageLoadMetricsEmbedder to enable metric and histogram collection.
    (3) Adds unit tests for LocalNetworkRequestsPageLoadMetricsObserver.
    (4) Updates the Chrome browser and unit test BUILD files to build the LocalNetworkRequestsPageLoadMetricsObserver and its unit tests.
    (5) Registers the new local network requests UMA histograms and UKM metrics in histograms.xml and ukm.xml, respectively.
    (6) Adds the |SetSocketAddress| method to NavigationSimulator to support specification of the socket address of a navigation.
    
    BUG=735085,728707
    
    Change-Id: Ie176881a326ca7a856c1813bfc2d031c5ae4261b
    Reviewed-on: https://chromium-review.googlesource.com/532254
    Commit-Queue: U Thakore <uthakore@chromium.org>
    Reviewed-by: default avatarRobert Kaplow <rkaplow@chromium.org>
    Reviewed-by: default avatarBryan McQuade <bmcquade@chromium.org>
    Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#485037}
    54c314a5
BUILD.gn 258 KB