DescriptionStandardize which page loads are tracked
The current PLM implementation has a concept of 'renderer tracked' which indicates
whether the given page load is expected to report metrics from the render process.
Many page load observers filter out non-tracked navigations by returning early in
OnComplete if the provided PageLoadTiming is empty, but this is non-obvious so some
observers forget to do this, which results in them tracking e.g. non-HTML pages, but
not receiving any metrics for those pages. See
https://bugs.chromium.org/p/chromium/issues/detail?id=627536 for one example.
Based on feedback from other observer implementers, there's a consistent request to
avoid tracking the following:
1. error pages (4xx, 5xx)
2. non-HTTP/HTTPS pages
3. non-HTML pages
Based on the above, this change gets rid of the 'renderer tracked' intermediate
state, and updates DidStartNavigation and DidFinishNavigation to check to see if
the given NavigationHandle meets any of the above criteria for not being tracked,
and if so:
* In DidStartNavigation, we do not create a PageLoadTracker
* In DidFinishNavigation, we'll tell the existing PageLoadTracker (if any) that it
should stop tracking metrics. If a PageLoadTracker has stopped tracking metrics, it
will not invoke additional callbacks such as OnComplete on observers.
Note that certain criteria, such as whether the page is HTML, or an error page,
(or even a same page navigation) are not known until commit, and thus we begin
tracking such page loads in DidStartNavigation but stop tracking at commit time.
BUG=627585
Committed: https://crrev.com/26615f40a69f11cee759a0b546061ea84fff8ca8
Cr-Commit-Position: refs/heads/master@{#405774}
Patch Set 1 #Patch Set 2 : ordering cleanup #Patch Set 3 : add comment #Patch Set 4 : fix #Patch Set 5 : rename #Patch Set 6 : fix broken tests #Patch Set 7 : rename variable #Patch Set 8 : updates #Patch Set 9 : fixes #Patch Set 10 : fix formatting #Patch Set 11 : update test to reflect fix #Patch Set 12 : update comments #Patch Set 13 : Fixes #Patch Set 14 : cleanup #Patch Set 15 : fix #Patch Set 16 : simplify #Patch Set 17 : fix observers #Patch Set 18 : fix #Patch Set 19 : fix #Patch Set 20 : address test failures #Patch Set 21 : split out second half of change #Patch Set 22 : fix test #Patch Set 23 : revert engagement observer change #Patch Set 24 : test fixes #Patch Set 25 : cleanup #Patch Set 26 : revert whitespace change #
Total comments: 7
Patch Set 27 : address comments #Patch Set 28 : address comment #Patch Set 29 : add tests #Dependent Patchsets: Messages
Total messages: 60 (48 generated)
|