CHECK(navigation_initiator_string_.has_value());See https://chromium-review.git.corp.google.com/c/chromium/src/+/8255994 for refcatoring.
| 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. |
Owner review. Simon, could you have a look at histograms?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Owner review
toyoshim@, could you have a look at PLMO?
CHECK(navigation_initiator_string_.has_value());See https://chromium-review.git.corp.google.com/c/chromium/src/+/8255994 for refcatoring.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
+rakina@ for content/public/browser/preload_serving_metrics_capsule.h
| 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 |
const std::array<std::string_view, 2> navigation_initiators = {Suggestion: We can avoid the std::vector heap allocation on the FCP recording path by using base::span with static constexpr arrays, e.g.:
```cpp
static constexpr std::string_view kAllOnly[] = {"All"};
static constexpr std::string_view kAllAndSrp[] = {"All", "SRP"};
const base::span<const std::string_view> srp_alls =
is_url_srp ? kAllAndSrp : kAllOnly;
const std::string& navigation_initiator_string,Suggestion: Consider using `std::string_view` instead of `const std::string&` for `navigation_initiator_string` to follow modern Chromium C++ string parameter conventions (and similarly in `preload_serving_metrics.h` / `.cc`).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
| Commit-Queue | +1 |
+1 with nits
(sorry, mistakenly pushed CQ+2)
const std::array<std::string_view, 2> navigation_initiators = {Suggestion: We can avoid the std::vector heap allocation on the FCP recording path by using base::span with static constexpr arrays, e.g.:
```cpp
static constexpr std::string_view kAllOnly[] = {"All"};
static constexpr std::string_view kAllAndSrp[] = {"All", "SRP"};
const base::span<const std::string_view> srp_alls =
is_url_srp ? kAllAndSrp : kAllOnly;
Done
Suggestion: Consider using `std::string_view` instead of `const std::string&` for `navigation_initiator_string` to follow modern Chromium C++ string parameter conventions (and similarly in `preload_serving_metrics.h` / `.cc`).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
11 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: content/browser/preloading/preload_serving_metrics.h
Insertions: 5, Deletions: 4.
The diff is too large to show. Please review the diff.
```
```
The name of the file: content/browser/preloading/preload_serving_metrics.cc
Insertions: 11, Deletions: 7.
The diff is too large to show. Please review the diff.
```
```
The name of the file: content/public/browser/preload_serving_metrics_capsule.h
Insertions: 3, Deletions: 2.
The diff is too large to show. Please review the diff.
```
PreloadServingMetrics: Record FCP with InitiatorLocation and SRP variants
This is a preparation of https://crrev.com/c/8255995.
Record UMA
PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.WithoutFiltering.{InitiatorLocation}.{NavigationDestinationSuffix}.{UsedInstantLoad}.
Note that FCP for BFCache is not recorded. See [1] how
`BackForwardCachePageLoadMetricsObserver` handles it.
[1]
https://source.chromium.org/chromium/chromium/src/+/main:components/page_load_metrics/browser/observers/back_forward_cache_page_load_metrics_observer.cc;l=194-195;drc=7dba004a4ad3584c1e1555a7d62eefb62ec00775
TAG=agy
CONV=5d71549e-0061-42b8-a2c5-9289dcd6183d
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |