| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
class SoftNavigationBackForwardCacheTest : public MetricIntegrationTest {This is fine, but I think we discussed in a previous patch that if you extend `SoftNavigationTest` then you can share some base members and some shared SetUp, instead of using free functions and passing state around.
I'll leave resolved because this is just style.
soft_navigation_count_++;This is totally fine and matches existing implementation-- but some quick thoughts on the long term design:
So the pattern is, I think:
---
I think you are planning to add Soft-nav specific metrics to `PageLoadTracker`? But I wonder if the page-global soft-nav metrics (soft-nav-count, *-before-first-soft-nav, etc) should all go there as well?
You may already have presented that design, I'm just trying to catch up!
https://bit.ly/soft-navigation1. bit.ly links are basically an ad-serving system now, so we should update these.
2. The doc links to an old soft-navs design doc, I would link to either the WICG repo (https://github.com/WICG/soft-navigations) or the spec (https://wicg.github.io/soft-navigations/) -- Note: they both link to each other already.
Could you also update the existing xml docs/links?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
soft_navigation_count_++;This is totally fine and matches existing implementation-- but some quick thoughts on the long term design:
- It seems to me like there some existing duplication amongst pageload observer types, but not everything is duplicated...
- We already have a common base class `PageLoadMetricsObserver`, (though it seems not to have much in the way of implementation defaults), and it has a default Delegate, which is typically `PageLoadTracker`, I think
- We also already have a common `OnComplete(timing)` which specific PLM observers override, and which acts as the gateway between fetching common metrics from the Delegate, and Recording specific metrics to UKM which differ per PLM observer type.
So the pattern is, I think:
- Common metrics are in PageLoadTracker
- Specific reporting is totally customized
- Timings for recording have defaults, but can be overridden
---
I think you are planning to add Soft-nav specific metrics to `PageLoadTracker`? But I wonder if the page-global soft-nav metrics (soft-nav-count, *-before-first-soft-nav, etc) should all go there as well?
You may already have presented that design, I'm just trying to catch up!
Yeah, thank you! So for now, what I'm trying to get done is the counts, and I figured what I have here is the simplest way to accomplish it.
For the other metrics, my current thinking / rough plan is that I'll try to carve out a class from the ukm_page_load_metrics_observer.cc (the logic about always logging the "previous" soft nav event), and then see how to use that in the prerender and bfcache observers.
I've also been reading the page load tracker and the metrics dispatcher, and will see how / if adding to these is needed. Mostly I'm worried about the mixing of delayed dispatch (e.g. timings that are waiting for other frames) with more synchronous dispatch like the OnSoftNavigation hook that I'm using here. But for the count, I think it's correct-ish.
1. bit.ly links are basically an ad-serving system now, so we should update these.
2. The doc links to an old soft-navs design doc, I would link to either the WICG repo (https://github.com/WICG/soft-navigations) or the spec (https://wicg.github.io/soft-navigations/) -- Note: they both link to each other already.Could you also update the existing xml docs/links?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Thanks a lot!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[soft navs] Add HistoryNavigation.SoftNavigationCount
This metric works just like Pageload.SoftNavigationcount and
PrerenderPageLoad.SoftNavigationCount.
Privacy doc:
https://docs.google.com/document/d/1ZhUkF63xINZDVQ3e5Bg370TpOKGf6_-_AuznrzB2tEk/edit?resourcekey=0-dtxS11-tTye7_GjEzMHuyw
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |