• Robert Ogden's avatar
    Add Metrics struct to IsolatedPrerenderTabHelper · 8b34a3d1
    Robert Ogden authored
    This struct keeps all the metrics about prefetching actions. This CL is
    in preparation for recording these metrics in UKM by plumbing them out
    of the TabHelper.
    
    Two small behavioral changes:
    * all predicted URLs will now be checked for eligibility, even if the
      max prefetching limit has already been reached. In reality, this
      would probably never happen anyways but it came up in testing.
    * Redirects count against attempts. This way, eligible and attempt #s
      always line up with respect to the maximum number of prefetches
    
    Bug: 1064726
    Change-Id: I5d0f0b9706c12952f65335e67915b04eea60ed7a
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2125615
    Commit-Queue: Robert Ogden <robertogden@chromium.org>
    Reviewed-by: default avatarTarun Bansal <tbansal@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#754880}
    8b34a3d1
isolated_prerender_tab_helper.cc 18.6 KB