| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM
Change-Id: Id906e036760e2584493d53cd4f6dfabe3ab4a972nit: is there an existing bug id for tracking?
int64_t soft_navigation_count_ = 0;nit: should this be uint64_t since negative values don't make sense? I guess int64_t matches the ukm builder though, so maybe not (or use base::saturated_cast<> to convert)?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
nit: is there an existing bug id for tracking?
I picked the one about prerender and bfcache, since it's sorta preparation for that.
nit: should this be uint64_t since negative values don't make sense? I guess int64_t matches the ukm builder though, so maybe not (or use base::saturated_cast<> to convert)?
Yeah, maybe keeping it simple is best, for consistency with the ukm builder. However I added a couple of CHECKs that it's not negative.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/page_load_metrics/observers/core/ukm_page_load_metrics_observer.cc
Insertions: 5, Deletions: 3.
@@ -880,6 +880,7 @@
}
void UkmPageLoadMetricsObserver::OnSoftNavigation() {
+ CHECK_GE(soft_navigation_count_, 0);
soft_navigation_count_++;
// When the 1st soft navigation comes in, we record the
// soft_navigation_interval_responsiveness_metrics_normalization_ as INP
@@ -1226,15 +1227,16 @@
}
void UkmPageLoadMetricsObserver::RecordLastSoftNavigation() {
- ukm::builders::PageLoad builder(GetDelegate().GetPageUkmSourceId());
-
- builder.SetSoftNavigationCount(soft_navigation_count_);
+ CHECK_GE(soft_navigation_count_, 0);
// Record last soft navigation metrics. The smallest count that would be set
// for an actual soft navigation metric is 1.
if (soft_navigation_count_) {
RecordSoftNavigationMetrics();
}
+
+ ukm::builders::PageLoad builder(GetDelegate().GetPageUkmSourceId());
+ builder.SetSoftNavigationCount(soft_navigation_count_);
builder.Record(ukm::UkmRecorder::Get());
// Record soft navigation count histogram to UMA.
```
[soft navs] Simplify UKM_PLMO::RecordSoftNavigationMetrics().
Instead of passing the mojom record into the method, use a field to
count the soft navs (like we do for the other observers, bfcache and
prerender) and only access the mojom record inside
RecordSoftNavigationMetrics. This makes things more consistent with the
usage in the bfcache and prerender ukm observers.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |