Introduce PreloadServingMetrics.{ChromeInitiatorLocation}.{SrpAll} [chromium/src : main]

0 views
Skip to first unread message

Huanpo Lin (Gerrit)

unread,
Jul 22, 2026, 4:52:29 AM (2 days ago) Jul 22
to Takashi Toyoshima, Rakina Zata Amni, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
Attention needed from Hiroki Nakagawa, Ken Okada, Rakina Zata Amni and Takashi Toyoshima

Huanpo Lin added 1 comment

Patchset-level comments
Open in Gerrit

Related details

Attention is currently required from:
  • Hiroki Nakagawa
  • Ken Okada
  • Rakina Zata Amni
  • Takashi Toyoshima
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ia4fb4ecf71a80c484dd2097b6c286b5051cb8201
Gerrit-Change-Number: 8129579
Gerrit-PatchSet: 10
Gerrit-Owner: Huanpo Lin <robe...@chromium.org>
Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Reviewer: Huanpo Lin <robe...@chromium.org>
Gerrit-Reviewer: Ken Okada <ken...@chromium.org>
Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-Attention: Ken Okada <ken...@chromium.org>
Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
Gerrit-Comment-Date: Wed, 22 Jul 2026 08:52:05 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Takashi Toyoshima (Gerrit)

unread,
Jul 22, 2026, 8:42:33 AM (2 days ago) Jul 22
to Huanpo Lin, Rakina Zata Amni, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
Attention needed from Hiroki Nakagawa, Huanpo Lin, Ken Okada and Rakina Zata Amni

Takashi Toyoshima added 1 comment

File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc
Line 97, Patchset 10 (Latest):
void PreloadServingMetricsPageLoadMetricsObserver::
OnRestoreFromBackForwardCache(
const page_load_metrics::mojom::PageLoadTiming& timing,
content::NavigationHandle* navigation_handle) {
is_bfcache_ = true;
RetrieveNavigationInitiatorLocationAndSrp(navigation_handle);
MaybeRecord();
Takashi Toyoshima . unresolved

Currently, BFCache cases are handled in a wrong way. Maybe, the first navigation is not recorded correctly, and the BFCache activation is recorded twice on activation and page close, Complete?

Open in Gerrit

Related details

Attention is currently required from:
  • Hiroki Nakagawa
  • Huanpo Lin
  • Ken Okada
  • Rakina Zata Amni
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ia4fb4ecf71a80c484dd2097b6c286b5051cb8201
      Gerrit-Change-Number: 8129579
      Gerrit-PatchSet: 10
      Gerrit-Owner: Huanpo Lin <robe...@chromium.org>
      Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
      Gerrit-Reviewer: Huanpo Lin <robe...@chromium.org>
      Gerrit-Reviewer: Ken Okada <ken...@chromium.org>
      Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
      Gerrit-Attention: Huanpo Lin <robe...@chromium.org>
      Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
      Gerrit-Attention: Ken Okada <ken...@chromium.org>
      Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Comment-Date: Wed, 22 Jul 2026 12:42:01 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Huanpo Lin (Gerrit)

      unread,
      Jul 23, 2026, 2:47:57 AM (yesterday) Jul 23
      to Taiyo Mizuhashi, Takashi Toyoshima, Rakina Zata Amni, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
      Attention needed from Hiroki Nakagawa, Ken Okada, Rakina Zata Amni and Takashi Toyoshima

      Huanpo Lin added 1 comment

      File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc

      void PreloadServingMetricsPageLoadMetricsObserver::
      OnRestoreFromBackForwardCache(
      const page_load_metrics::mojom::PageLoadTiming& timing,
      content::NavigationHandle* navigation_handle) {
      is_bfcache_ = true;
      RetrieveNavigationInitiatorLocationAndSrp(navigation_handle);
      MaybeRecord();
      Takashi Toyoshima . unresolved

      Currently, BFCache cases are handled in a wrong way. Maybe, the first navigation is not recorded correctly, and the BFCache activation is recorded twice on activation and page close, Complete?

      Huanpo Lin

      I see, I've updated the logic, PTAL.
      My understanding is that:
      1. `PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache` needs to record the first navigation (non BFCache) before the navigation entering the cache.
      2. After recording in `PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache`, the capsule is reset to avoid double recording if the page is never restored.
      3. `PreloadServingMetricsPageLoadMetricsObserver::OnRestoreFromBackForwardCache` will set the correct information if the page is restored.
      4. `OnComplete/FlushMetricsOnAppEnterBackground` will record the information if available.
      Is my understanding correct?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hiroki Nakagawa
      • Ken Okada
      • Rakina Zata Amni
      • Takashi Toyoshima
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ia4fb4ecf71a80c484dd2097b6c286b5051cb8201
      Gerrit-Change-Number: 8129579
      Gerrit-PatchSet: 14
      Gerrit-Owner: Huanpo Lin <robe...@chromium.org>
      Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
      Gerrit-Reviewer: Huanpo Lin <robe...@chromium.org>
      Gerrit-Reviewer: Ken Okada <ken...@chromium.org>
      Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Taiyo Mizuhashi <ta...@chromium.org>
      Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
      Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
      Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
      Gerrit-Attention: Ken Okada <ken...@chromium.org>
      Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Comment-Date: Thu, 23 Jul 2026 06:47:24 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Takashi Toyoshima (Gerrit)

      unread,
      Jul 23, 2026, 4:55:26 AM (yesterday) Jul 23
      to Huanpo Lin, Taiyo Mizuhashi, Rakina Zata Amni, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
      Attention needed from Hiroki Nakagawa, Huanpo Lin, Ken Okada and Rakina Zata Amni

      Takashi Toyoshima voted and added 1 comment

      Votes added by Takashi Toyoshima

      Code-Review+1

      1 comment

      File chrome/browser/page_load_metrics/observers/back_forward_cache_page_load_metrics_observer_browsertest.cc
      Line 773, Patchset 14 (Latest): GURL url_a(embedded_test_server()->GetURL("a.com", "/title1.html"));
      Takashi Toyoshima . unresolved

      nit: Can we use a.test and b.test?
      IIRC, any host will be resolved into the same address, and it just works.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Hiroki Nakagawa
      • Huanpo Lin
      • Ken Okada
      • Rakina Zata Amni
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Ia4fb4ecf71a80c484dd2097b6c286b5051cb8201
          Gerrit-Change-Number: 8129579
          Gerrit-PatchSet: 14
          Gerrit-Owner: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-Reviewer: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Ken Okada <ken...@chromium.org>
          Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Taiyo Mizuhashi <ta...@chromium.org>
          Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
          Gerrit-Attention: Huanpo Lin <robe...@chromium.org>
          Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-Attention: Ken Okada <ken...@chromium.org>
          Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Jul 2026 08:55:03 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Takashi Toyoshima (Gerrit)

          unread,
          Jul 23, 2026, 4:56:21 AM (yesterday) Jul 23
          to Huanpo Lin, Taiyo Mizuhashi, Rakina Zata Amni, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Hiroki Nakagawa, Huanpo Lin, Ken Okada and Rakina Zata Amni

          Takashi Toyoshima added 1 comment

          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc
          Line 97, Patchset 10:
          void PreloadServingMetricsPageLoadMetricsObserver::
          OnRestoreFromBackForwardCache(
          const page_load_metrics::mojom::PageLoadTiming& timing,
          content::NavigationHandle* navigation_handle) {
          is_bfcache_ = true;
          RetrieveNavigationInitiatorLocationAndSrp(navigation_handle);
          MaybeRecord();
          Takashi Toyoshima . unresolved

          Currently, BFCache cases are handled in a wrong way. Maybe, the first navigation is not recorded correctly, and the BFCache activation is recorded twice on activation and page close, Complete?

          Huanpo Lin

          I see, I've updated the logic, PTAL.
          My understanding is that:
          1. `PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache` needs to record the first navigation (non BFCache) before the navigation entering the cache.
          2. After recording in `PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache`, the capsule is reset to avoid double recording if the page is never restored.
          3. `PreloadServingMetricsPageLoadMetricsObserver::OnRestoreFromBackForwardCache` will set the correct information if the page is restored.
          4. `OnComplete/FlushMetricsOnAppEnterBackground` will record the information if available.
          Is my understanding correct?

          Takashi Toyoshima

          Yes, this direction sounds correct to me.

          Gerrit-Comment-Date: Thu, 23 Jul 2026 08:55:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Huanpo Lin <robe...@chromium.org>
          Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Huanpo Lin (Gerrit)

          unread,
          Jul 23, 2026, 7:15:32 AM (24 hours ago) Jul 23
          to Max Curran, Takashi Toyoshima, Taiyo Mizuhashi, Rakina Zata Amni, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Hiroki Nakagawa, Ken Okada, Max Curran and Rakina Zata Amni

          Huanpo Lin added 1 comment

          Patchset-level comments
          File-level comment, Patchset 14 (Latest):
          Huanpo Lin . resolved

          include curranmax@ for tools/metrics/histograms/metadata/preloading/histograms.xml, PTAL

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Hiroki Nakagawa
          • Ken Okada
          • Max Curran
          • Rakina Zata Amni
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Ia4fb4ecf71a80c484dd2097b6c286b5051cb8201
          Gerrit-Change-Number: 8129579
          Gerrit-PatchSet: 14
          Gerrit-Owner: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-Reviewer: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Ken Okada <ken...@chromium.org>
          Gerrit-Reviewer: Max Curran <curr...@chromium.org>
          Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Taiyo Mizuhashi <ta...@chromium.org>
          Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
          Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-Attention: Ken Okada <ken...@chromium.org>
          Gerrit-Attention: Max Curran <curr...@chromium.org>
          Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Jul 2026 11:15:01 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Hiroki Nakagawa (Gerrit)

          unread,
          Jul 23, 2026, 7:24:02 AM (24 hours ago) Jul 23
          to Huanpo Lin, Max Curran, Takashi Toyoshima, Taiyo Mizuhashi, Rakina Zata Amni, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin, Ken Okada, Max Curran and Rakina Zata Amni

          Hiroki Nakagawa added 2 comments

          File content/browser/preloading/preload_serving_metrics.cc
          Line 310, Patchset 12: kNoPreload = 3,
          Hiroki Nakagawa . unresolved

          This enum order seems very random. Can we sort them in the order of the "preloading pipeline" stages? (In my mental model, bfcache comes after prefetch and prerender)

          ```
          enum class PreloadServingMetricsType {
          kNoPreload = 0,
          kPrefetch = 1,
          kPrerender = 2,
          kBFCache = 3,
          kMaxValue = kBFCache,
          };
          ```

          I know we won't be able to strictly maintain this order as new types are appended, but it makes sense to organize it logically for now.

          Line 344, Patchset 12: }
          Hiroki Nakagawa . unresolved

          Instead of nesting if-statements for kPrefetch and kNoPreload, can we flatten them for simplicity like this?

          ```
          auto type = PreloadServingMetricsType::kNoPreload;
          if (prerender_initial_preload_serving_metrics) {
          type = PreloadServingMetricsType::kPrerender;
          } else if (is_bfcache) {
          type = PreloadServingMetricsType::kBFCache;
          } else if (const auto* prefetch_match = GetMeaningfulPrefetchMatchMetrics();
          prefetch_match && prefetch_match->IsActualMatch()) {
          type = PreloadServingMetricsType::kPrefetch;
          }
          ```

          Also, checking BFCache, Prerender, and Prefetch in this order may be more natural? (BFCache restoration happens after prefetch/prerender)

          ```
          auto type = PreloadServingMetricsType::kNoPreload;
          if (is_bfcache) {
          type = PreloadServingMetricsType::kBFCache;
          } else if (prerender_initial_preload_serving_metrics) {
          type = PreloadServingMetricsType::kPrerender;
          } else if (const auto* prefetch_match = GetMeaningfulPrefetchMatchMetrics();
          prefetch_match && prefetch_match->IsActualMatch()) {
          type = PreloadServingMetricsType::kPrefetch;
          }
          ```
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Huanpo Lin
          Gerrit-Attention: Huanpo Lin <robe...@chromium.org>
          Gerrit-Attention: Ken Okada <ken...@chromium.org>
          Gerrit-Attention: Max Curran <curr...@chromium.org>
          Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Jul 2026 11:23:26 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Huanpo Lin (Gerrit)

          unread,
          Jul 23, 2026, 7:31:01 AM (23 hours ago) Jul 23
          to Max Curran, Takashi Toyoshima, Taiyo Mizuhashi, Rakina Zata Amni, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin, Ken Okada, Max Curran, Rakina Zata Amni and Takashi Toyoshima

          Huanpo Lin added 2 comments

          File chrome/browser/page_load_metrics/observers/back_forward_cache_page_load_metrics_observer_browsertest.cc
          Line 773, Patchset 14 (Latest): GURL url_a(embedded_test_server()->GetURL("a.com", "/title1.html"));
          Takashi Toyoshima . unresolved

          nit: Can we use a.test and b.test?
          IIRC, any host will be resolved into the same address, and it just works.

          Huanpo Lin

          Yes, `a.test` and `b.test` will still work.
          But as the other tests in this file use `a.com` and `b.com`, should it also follow the same pattern for consistency?

          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc
          Line 97, Patchset 10:
          void PreloadServingMetricsPageLoadMetricsObserver::
          OnRestoreFromBackForwardCache(
          const page_load_metrics::mojom::PageLoadTiming& timing,
          content::NavigationHandle* navigation_handle) {
          is_bfcache_ = true;
          RetrieveNavigationInitiatorLocationAndSrp(navigation_handle);
          MaybeRecord();
          Takashi Toyoshima . resolved

          Currently, BFCache cases are handled in a wrong way. Maybe, the first navigation is not recorded correctly, and the BFCache activation is recorded twice on activation and page close, Complete?

          Huanpo Lin

          I see, I've updated the logic, PTAL.
          My understanding is that:
          1. `PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache` needs to record the first navigation (non BFCache) before the navigation entering the cache.
          2. After recording in `PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache`, the capsule is reset to avoid double recording if the page is never restored.
          3. `PreloadServingMetricsPageLoadMetricsObserver::OnRestoreFromBackForwardCache` will set the correct information if the page is restored.
          4. `OnComplete/FlushMetricsOnAppEnterBackground` will record the information if available.
          Is my understanding correct?

          Takashi Toyoshima

          Yes, this direction sounds correct to me.

          Huanpo Lin

          Thanks for the confirmation.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Huanpo Lin
          • Ken Okada
          • Max Curran
          • Rakina Zata Amni
          • Takashi Toyoshima
          Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-Attention: Ken Okada <ken...@chromium.org>
          Gerrit-Attention: Max Curran <curr...@chromium.org>
          Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Jul 2026 11:30:25 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Rakina Zata Amni (Gerrit)

          unread,
          Jul 23, 2026, 9:12:27 AM (22 hours ago) Jul 23
          to Huanpo Lin, Max Curran, Takashi Toyoshima, Taiyo Mizuhashi, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin, Ken Okada, Max Curran and Takashi Toyoshima

          Rakina Zata Amni voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Huanpo Lin
          • Ken Okada
          • Max Curran
          • Takashi Toyoshima
          Gerrit-Comment-Date: Thu, 23 Jul 2026 13:11:51 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Ken Okada (Gerrit)

          unread,
          Jul 23, 2026, 12:13:56 PM (19 hours ago) Jul 23
          to Huanpo Lin, Rakina Zata Amni, Max Curran, Takashi Toyoshima, Taiyo Mizuhashi, Hiroki Nakagawa, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin, Max Curran and Takashi Toyoshima

          Ken Okada added 23 comments

          File chrome/browser/page_load_metrics/observers/back_forward_cache_page_load_metrics_observer_browsertest.cc
          Line 770, Patchset 14 (Latest):IN_PROC_BROWSER_TEST_F(BackForwardCachePageLoadMetricsObserverBrowserTest,
          Line 794, Patchset 14 (Latest): EXPECT_TRUE(ui_test_utils::NavigateToURL(browser(), url_b));
          Ken Okada . unresolved

          Use `about:blank` for flush.

          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.h
          Line 68, Patchset 14 (Latest): bool is_bfcache_ = false;
          Ken Okada . unresolved

          `has_restored_from_bfcache_` is better as "This (PLMO) is BFCache" is not true.

          Line 67, Patchset 14 (Latest): bool is_srp_ = false;
          Ken Okada . unresolved

          `is_url_srp_` is better as "This (PLMO) is SRP" is not true, but "The page's url is SRP."

          Line 66, Patchset 14 (Latest): std::string navigation_type_string_ = "Other";
          Ken Okada . unresolved

          Could you use `std::optional<std::string>` and explicitly set `"Other"` in retrieve?

          Line 66, Patchset 14 (Latest): std::string navigation_type_string_ = "Other";
          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc
          Line 93, Patchset 14 (Latest):PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache(
          Ken Okada . unresolved

          Prefer placing it and OnRestoreFromBackForwardCache after FlushMetricsOnAppEnterBackground.

          Line 106, Patchset 14 (Latest): preload_serving_metrics_capsule_ =
          Ken Okada . unresolved

          Could you add a comment e.g. "Take a `PreloadServingMetrics` of the `NavigationHandle` representing the navigation that used BFCache. Note that the `NavigationHandle` differs from the one created this PLMO, and the `PreloadServingMetrics` for it has been reset."

          Line 113, Patchset 14 (Latest): // `OnFirstContentfulPaintInPage()` is called after `OnCommit()` (or
          Ken Okada . unresolved

          1. Could you check `PLMO::OnFirstContentfulPaintInPage` is called for BFCache?
          2. Existence of `preload_serving_metrics_capsule_` is important invariant and I'd like to preserve.

          So, if 1 is yes, add `if (is_bf_cache_) { return; }`. If 1 is false, revert it and add a comment for BFCache.

          ---

          If you set PSMC on OnRestoreFromBackForwardCache, the `CHECK` looks to pass.

          Line 151, Patchset 14 (Latest): preload_serving_metrics_capsule_->RecordPreloadServingMetricsByInitiator(
          Ken Okada . unresolved

          Could you make it clear what concept we use? `Initiator`/`InitiatorLocation`/`NavigationType`? (If you don't have strong opinion, I vote `NavigationInitiator`.) Also, please update the doc for the concept.

          cc: nhi...@chromium.org for naming

          Line 151, Patchset 14 (Latest): preload_serving_metrics_capsule_->RecordPreloadServingMetricsByInitiator(
          Ken Okada . unresolved

          This and taking PSMC for BFCache sound weird for BFCache, but correcting it needs more refactoring. Could you add a TODO comment?

          File content/browser/preloading/preload_serving_metrics.h
          Line 228, Patchset 14 (Latest): bool is_bfcache) const;
          Ken Okada . unresolved

          The order should be `is_bfcache`, `navigation_initiator_string` and then `is_srp`, as `is_bfcache` is like the existence of `PSM`.

          Line 226, Patchset 14 (Latest): const std::string& navigation_type_string,
          Ken Okada . unresolved

          Same to the comment on components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc L151.

          File content/browser/preloading/preload_serving_metrics.cc
          Line 310, Patchset 14 (Latest): kNoPreload = 3,
          Ken Okada . unresolved

          1. It's not PSMType. How about `UsedInstantLoad`?
          2. I'd like to use `kNoInstantLoad = 0,` as it should be called the default. (And it should be MECE, but "No preloads && Used BFCache" can be satisfied.)
          3. `kPrefetch < kPrerender` as it's the order in preload pipeline.

          ```
          enum class UsedInstantLoad {
          kNoInstantLoad = 0,

          kPrefetch = 1,
          kPrerender = 2,
          kBFCache = 3,
          kMaxValue = kBFCache,
          };
          ```

          cc: nhi...@chromium.org for naming

          Line 334, Patchset 14 (Latest): } else if (is_bfcache) {
          Ken Okada . unresolved

          `is_bfcache` should be checked first.

          Line 347, Patchset 14 (Latest): "PreloadServingMetrics." + navigation_type_string + ".All", type);
          File content/browser/preloading/preload_serving_metrics_unittest.cc
          Line 59, Patchset 14 (Latest): log->RecordPreloadServingMetricsByInitiator("Other", false, false);
          Ken Okada . unresolved

          Add `/*arg_name=*/`s.

          Line 1689, Patchset 14 (Latest):} // namespace content
          Ken Okada . unresolved

          Could you add a test for a case that `PreloadServingMetrics.Other.SRP` is recorded?

          File tools/metrics/histograms/metadata/preloading/histograms.xml
          Line 30, Patchset 14 (Latest): <variant name="Other" summary="Initiated from Other"/>
          Ken Okada . unresolved

          other

          Line 183, Patchset 14 (Latest):<variants name="SrpAll">
          Ken Okada . unresolved

          How about `NavigationDestinationSuffix`?

          Line 184, Patchset 14 (Latest): <variant name="All" summary="all navigations"/>
          Ken Okada . unresolved

          All

          Line 185, Patchset 14 (Latest): <variant name="SRP" summary="Google Search Result Pages"/>
          Ken Okada . unresolved

          Navigation to Google Search Result Page

          Line 456, Patchset 14 (Latest): Recorded when navigation finishes. Records the preload mechanism used for
          Ken Okada . unresolved

          the instant load technology?

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Huanpo Lin
          • Max Curran
          • Takashi Toyoshima
          Gerrit-Attention: Max Curran <curr...@chromium.org>
          Gerrit-Comment-Date: Thu, 23 Jul 2026 16:13:32 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Max Curran (Gerrit)

          unread,
          Jul 23, 2026, 12:48:23 PM (18 hours ago) Jul 23
          to Huanpo Lin, Rakina Zata Amni, Takashi Toyoshima, Taiyo Mizuhashi, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin and Takashi Toyoshima

          Max Curran voted and added 1 comment

          Votes added by Max Curran

          Code-Review+1

          1 comment

          Patchset-level comments
          Max Curran . resolved

          histograms.xml LGTM % addressing Ken's comments.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Huanpo Lin
          • Takashi Toyoshima
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          Gerrit-Comment-Date: Thu, 23 Jul 2026 16:47:59 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Hiroki Nakagawa (Gerrit)

          unread,
          Jul 23, 2026, 10:07:15 PM (9 hours ago) Jul 23
          to Huanpo Lin, Max Curran, Rakina Zata Amni, Takashi Toyoshima, Taiyo Mizuhashi, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin and Takashi Toyoshima

          Hiroki Nakagawa added 1 comment

          File content/browser/preloading/preload_serving_metrics.cc
          Ken Okada . unresolved

          1. It's not PSMType. How about `UsedInstantLoad`?
          2. I'd like to use `kNoInstantLoad = 0,` as it should be called the default. (And it should be MECE, but "No preloads && Used BFCache" can be satisfied.)
          3. `kPrefetch < kPrerender` as it's the order in preload pipeline.

          ```
          enum class UsedInstantLoad {
          kNoInstantLoad = 0,
          kPrefetch = 1,
          kPrerender = 2,
          kBFCache = 3,
          kMaxValue = kBFCache,
          };
          ```

          cc: nhi...@chromium.org for naming

          Hiroki Nakagawa

          1. It's not PSMType. How about `UsedInstantLoad`?

          +1 to renaming.

          I think I see your point: generally speaking, "Preload" doesn't include BFCache. Personally, I'm not a big fan of using "Instant", since that's just the consequence of the load rather than the loading type itself. However, I don't come up with alternatives, and `UsedInstantLoad` looks appropriate in this situation.

          Gerrit-Comment-Date: Fri, 24 Jul 2026 02:06:46 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Ken Okada <ken...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Huanpo Lin (Gerrit)

          unread,
          2:09 AM (5 hours ago) 2:09 AM
          to Max Curran, Rakina Zata Amni, Takashi Toyoshima, Taiyo Mizuhashi, Hiroki Nakagawa, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Hiroki Nakagawa, Ken Okada and Takashi Toyoshima

          Huanpo Lin voted and added 25 comments

          Votes added by Huanpo Lin

          Commit-Queue+1

          25 comments

          File chrome/browser/page_load_metrics/observers/back_forward_cache_page_load_metrics_observer_browsertest.cc
          Line 770, Patchset 14:IN_PROC_BROWSER_TEST_F(BackForwardCachePageLoadMetricsObserverBrowserTest,
          Ken Okada . resolved
          Huanpo Lin

          Done

          Line 794, Patchset 14: EXPECT_TRUE(ui_test_utils::NavigateToURL(browser(), url_b));
          Ken Okada . resolved

          Use `about:blank` for flush.

          Huanpo Lin

          Done

          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.h
          Line 68, Patchset 14: bool is_bfcache_ = false;
          Ken Okada . resolved

          `has_restored_from_bfcache_` is better as "This (PLMO) is BFCache" is not true.

          Huanpo Lin

          Done

          Line 67, Patchset 14: bool is_srp_ = false;
          Ken Okada . resolved

          `is_url_srp_` is better as "This (PLMO) is SRP" is not true, but "The page's url is SRP."

          Huanpo Lin

          Done

          Line 66, Patchset 14: std::string navigation_type_string_ = "Other";
          Ken Okada . resolved

          Could you use `std::optional<std::string>` and explicitly set `"Other"` in retrieve?

          Huanpo Lin

          Done

          Line 66, Patchset 14: std::string navigation_type_string_ = "Other";
          Ken Okada . resolved
          Huanpo Lin

          Done

          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc
          Line 93, Patchset 14:PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache(
          Ken Okada . resolved

          Prefer placing it and OnRestoreFromBackForwardCache after FlushMetricsOnAppEnterBackground.

          Huanpo Lin

          Done

          Line 106, Patchset 14: preload_serving_metrics_capsule_ =
          Ken Okada . resolved

          Could you add a comment e.g. "Take a `PreloadServingMetrics` of the `NavigationHandle` representing the navigation that used BFCache. Note that the `NavigationHandle` differs from the one created this PLMO, and the `PreloadServingMetrics` for it has been reset."

          Huanpo Lin

          Done

          Line 113, Patchset 14: // `OnFirstContentfulPaintInPage()` is called after `OnCommit()` (or
          Ken Okada . unresolved

          1. Could you check `PLMO::OnFirstContentfulPaintInPage` is called for BFCache?


          2. Existence of `preload_serving_metrics_capsule_` is important invariant and I'd like to preserve.

          So, if 1 is yes, add `if (is_bf_cache_) { return; }`. If 1 is false, revert it and add a comment for BFCache.

          ---

          If you set PSMC on OnRestoreFromBackForwardCache, the `CHECK` looks to pass.

          Huanpo Lin

          For (1), I believe it is yes. There are some other tests which are not explicitly testing BFCache were failing in the previous patch so I changed this and added the comments.
          I've reverted back to use CHECK and added `has_entered_bfcache_`.
          The `is_bf_cache_(has_restored_from_bfcache_)` is called on restored so it won't work for this part. `has_entered_bfcache_` is introduced instead to prevent this, PTAL whether this pattern is more desired.

          Line 151, Patchset 14: preload_serving_metrics_capsule_->RecordPreloadServingMetricsByInitiator(
          Ken Okada . resolved

          This and taking PSMC for BFCache sound weird for BFCache, but correcting it needs more refactoring. Could you add a TODO comment?

          Huanpo Lin

          Done

          Line 151, Patchset 14: preload_serving_metrics_capsule_->RecordPreloadServingMetricsByInitiator(
          Ken Okada . resolved

          Could you make it clear what concept we use? `Initiator`/`InitiatorLocation`/`NavigationType`? (If you don't have strong opinion, I vote `NavigationInitiator`.) Also, please update the doc for the concept.

          cc: nhi...@chromium.org for naming

          Huanpo Lin

          Done

          File content/browser/preloading/preload_serving_metrics.h
          Line 228, Patchset 14: bool is_bfcache) const;
          Ken Okada . unresolved

          The order should be `is_bfcache`, `navigation_initiator_string` and then `is_srp`, as `is_bfcache` is like the existence of `PSM`.

          Huanpo Lin

          Sorry, I don't quite get this part why the order should be like this? The order currently is also the order of member declaration in the class. Could you rephrase it?

          Line 226, Patchset 14: const std::string& navigation_type_string,
          Ken Okada . resolved

          Same to the comment on components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc L151.

          Huanpo Lin

          Done

          File content/browser/preloading/preload_serving_metrics.cc
          Line 310, Patchset 12: kNoPreload = 3,
          Hiroki Nakagawa . resolved

          This enum order seems very random. Can we sort them in the order of the "preloading pipeline" stages? (In my mental model, bfcache comes after prefetch and prerender)

          ```
          enum class PreloadServingMetricsType {
          kNoPreload = 0,

          kPrefetch = 1,
          kPrerender = 2,
          kBFCache = 3,
          kMaxValue = kBFCache,
          };
          ```

          I know we won't be able to strictly maintain this order as new types are appended, but it makes sense to organize it logically for now.

          Huanpo Lin

          Done

          Line 310, Patchset 14: kNoPreload = 3,
          Ken Okada . resolved

          1. It's not PSMType. How about `UsedInstantLoad`?
          2. I'd like to use `kNoInstantLoad = 0,` as it should be called the default. (And it should be MECE, but "No preloads && Used BFCache" can be satisfied.)
          3. `kPrefetch < kPrerender` as it's the order in preload pipeline.

          ```
          enum class UsedInstantLoad {
          kNoInstantLoad = 0,
          kPrefetch = 1,
          kPrerender = 2,
          kBFCache = 3,
          kMaxValue = kBFCache,
          };
          ```

          cc: nhi...@chromium.org for naming

          Hiroki Nakagawa

          1. It's not PSMType. How about `UsedInstantLoad`?

          +1 to renaming.

          I think I see your point: generally speaking, "Preload" doesn't include BFCache. Personally, I'm not a big fan of using "Instant", since that's just the consequence of the load rather than the loading type itself. However, I don't come up with alternatives, and `UsedInstantLoad` looks appropriate in this situation.

          Huanpo Lin

          Done

          Line 334, Patchset 14: } else if (is_bfcache) {
          Ken Okada . resolved

          `is_bfcache` should be checked first.

          Huanpo Lin

          Done

          Line 344, Patchset 12: }
          Hiroki Nakagawa . resolved

          Instead of nesting if-statements for kPrefetch and kNoPreload, can we flatten them for simplicity like this?

          ```
          auto type = PreloadServingMetricsType::kNoPreload;
          if (prerender_initial_preload_serving_metrics) {
          type = PreloadServingMetricsType::kPrerender;
          } else if (is_bfcache) {
          type = PreloadServingMetricsType::kBFCache;
          } else if (const auto* prefetch_match = GetMeaningfulPrefetchMatchMetrics();
          prefetch_match && prefetch_match->IsActualMatch()) {
          type = PreloadServingMetricsType::kPrefetch;
          }
          ```

          Also, checking BFCache, Prerender, and Prefetch in this order may be more natural? (BFCache restoration happens after prefetch/prerender)

          ```
          auto type = PreloadServingMetricsType::kNoPreload;
          if (is_bfcache) {
          type = PreloadServingMetricsType::kBFCache;
          } else if (prerender_initial_preload_serving_metrics) {
          type = PreloadServingMetricsType::kPrerender;
          } else if (const auto* prefetch_match = GetMeaningfulPrefetchMatchMetrics();
          prefetch_match && prefetch_match->IsActualMatch()) {
          type = PreloadServingMetricsType::kPrefetch;
          }
          ```
          Huanpo Lin

          Done

          Line 347, Patchset 14: "PreloadServingMetrics." + navigation_type_string + ".All", type);
          Ken Okada . resolved
          Huanpo Lin

          Done

          File content/browser/preloading/preload_serving_metrics_unittest.cc
          Line 59, Patchset 14: log->RecordPreloadServingMetricsByInitiator("Other", false, false);
          Ken Okada . resolved

          Add `/*arg_name=*/`s.

          Huanpo Lin

          Done

          Line 1689, Patchset 14:} // namespace content
          Ken Okada . resolved

          Could you add a test for a case that `PreloadServingMetrics.Other.SRP` is recorded?

          Huanpo Lin

          Done

          File tools/metrics/histograms/metadata/preloading/histograms.xml
          Line 30, Patchset 14: <variant name="Other" summary="Initiated from Other"/>
          Ken Okada . resolved

          other

          Huanpo Lin

          Done

          Line 183, Patchset 14:<variants name="SrpAll">
          Ken Okada . resolved

          How about `NavigationDestinationSuffix`?

          Huanpo Lin

          Done

          Line 184, Patchset 14: <variant name="All" summary="all navigations"/>
          Ken Okada . resolved

          All

          Huanpo Lin

          Done

          Line 185, Patchset 14: <variant name="SRP" summary="Google Search Result Pages"/>
          Ken Okada . resolved

          Navigation to Google Search Result Page

          Huanpo Lin

          Done

          Line 456, Patchset 14: Recorded when navigation finishes. Records the preload mechanism used for
          Ken Okada . resolved

          the instant load technology?

          Huanpo Lin

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Hiroki Nakagawa
          • Ken Okada
          • Takashi Toyoshima
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Ia4fb4ecf71a80c484dd2097b6c286b5051cb8201
          Gerrit-Change-Number: 8129579
          Gerrit-PatchSet: 23
          Gerrit-Owner: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-Reviewer: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Ken Okada <ken...@chromium.org>
          Gerrit-Reviewer: Max Curran <curr...@chromium.org>
          Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Taiyo Mizuhashi <ta...@chromium.org>
          Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
          Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-Attention: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-Attention: Ken Okada <ken...@chromium.org>
          Gerrit-Comment-Date: Fri, 24 Jul 2026 06:08:39 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Hiroki Nakagawa <nhi...@chromium.org>
          Comment-In-Reply-To: Ken Okada <ken...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Hiroki Nakagawa (Gerrit)

          unread,
          2:32 AM (4 hours ago) 2:32 AM
          to Huanpo Lin, Max Curran, Rakina Zata Amni, Takashi Toyoshima, Taiyo Mizuhashi, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin, Ken Okada and Takashi Toyoshima

          Hiroki Nakagawa added 2 comments

          File chrome/browser/page_load_metrics/observers/back_forward_cache_page_load_metrics_observer_browsertest.cc
          Line 773, Patchset 14: GURL url_a(embedded_test_server()->GetURL("a.com", "/title1.html"));
          Takashi Toyoshima . unresolved

          nit: Can we use a.test and b.test?
          IIRC, any host will be resolved into the same address, and it just works.

          Huanpo Lin

          Yes, `a.test` and `b.test` will still work.
          But as the other tests in this file use `a.com` and `b.com`, should it also follow the same pattern for consistency?

          Hiroki Nakagawa

          I think it's nice to use domains reserved for tests in general, but you don't need to change the existing usage in this CL.

          File content/browser/preloading/preload_serving_metrics.cc
          Line 310, Patchset 14: kNoPreload = 3,
          Ken Okada . unresolved

          1. It's not PSMType. How about `UsedInstantLoad`?
          2. I'd like to use `kNoInstantLoad = 0,` as it should be called the default. (And it should be MECE, but "No preloads && Used BFCache" can be satisfied.)
          3. `kPrefetch < kPrerender` as it's the order in preload pipeline.

          ```
          enum class UsedInstantLoad {
          kNoInstantLoad = 0,
          kPrefetch = 1,
          kPrerender = 2,
          kBFCache = 3,
          kMaxValue = kBFCache,
          };
          ```

          cc: nhi...@chromium.org for naming

          Hiroki Nakagawa

          1. It's not PSMType. How about `UsedInstantLoad`?

          +1 to renaming.

          I think I see your point: generally speaking, "Preload" doesn't include BFCache. Personally, I'm not a big fan of using "Instant", since that's just the consequence of the load rather than the loading type itself. However, I don't come up with alternatives, and `UsedInstantLoad` looks appropriate in this situation.

          Huanpo Lin

          Done

          Hiroki Nakagawa

          s/kNoPreload/kNoInstantLoad/

          Also, please update the order.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Huanpo Lin
          • Ken Okada
          • Takashi Toyoshima
          Gerrit-Attention: Huanpo Lin <robe...@chromium.org>
          Gerrit-Attention: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-Attention: Ken Okada <ken...@chromium.org>
          Gerrit-Comment-Date: Fri, 24 Jul 2026 06:31:30 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Huanpo Lin <robe...@chromium.org>
          Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Hiroki Nakagawa (Gerrit)

          unread,
          2:47 AM (4 hours ago) 2:47 AM
          to Huanpo Lin, Max Curran, Rakina Zata Amni, Takashi Toyoshima, Taiyo Mizuhashi, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin, Ken Okada and Takashi Toyoshima

          Hiroki Nakagawa voted and added 5 comments

          Votes added by Hiroki Nakagawa

          Code-Review+1

          5 comments

          Patchset-level comments
          File-level comment, Patchset 23 (Latest):
          Hiroki Nakagawa . resolved

          LGTM after all the comments are addressed.

          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc
          Line 126, Patchset 23 (Latest):page_load_metrics::PageLoadMetricsObserver::ObservePolicy
          PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache(
          const page_load_metrics::mojom::PageLoadTiming& timing) {
          MaybeRecord();
          has_entered_bfcache_ = true;
          preload_serving_metrics_capsule_.reset();
          return CONTINUE_OBSERVING;
          }
          Hiroki Nakagawa . unresolved

          `MaybeRecord()` was not called on this event before this CL. Is this a fix for an existing bug?

          File content/browser/preloading/preload_serving_metrics_unittest.cc
          Line 242, Patchset 23 (Latest): base::test::ScopedFeatureList feature_list;
          feature_list.InitWithFeaturesAndParameters(
          {
          {
          features::kPrerender2FallbackPrefetchSpecRules,
          {},
          },
          },
          {});
          Hiroki Nakagawa . unresolved

          Why is this needed for BFCache test?

          Line 265, Patchset 23 (Latest):}
          Hiroki Nakagawa . unresolved

          Do we have a test case where both prefetch/prerender and BFCache are involved like this?

          • prefetch page-A
          • prerender page-A
          • activate page-A --> kPrerender is recorded
          • navigate away to page-B --> kNoPreload is recorded
          • navigate back to page-A --> kBFCache is recorded

          If not, can we add it?

          Line 272, Patchset 23 (Latest): base::test::ScopedFeatureList feature_list;
          feature_list.InitWithFeaturesAndParameters(
          {
          {
          features::kPrerender2FallbackPrefetchSpecRules,
          {},
          },
          },
          {});
          Hiroki Nakagawa . unresolved

          Ditto.

          Gerrit-Comment-Date: Fri, 24 Jul 2026 06:46:53 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Ken Okada (Gerrit)

          unread,
          4:15 AM (3 hours ago) 4:15 AM
          to Huanpo Lin, Hiroki Nakagawa, Max Curran, Rakina Zata Amni, Takashi Toyoshima, Taiyo Mizuhashi, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org

          Ken Okada added 10 comments

          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.h
          Line 74, Patchset 23: bool has_entered_bfcache_ = false;
          Ken Okada . unresolved

          I feel that `has_entered_bfcache_` is redundant and can be removed. It is used in OnFirstContentfulPaintInPage, but I believe that it's not called during the period from enter to restore.

          Line 71, Patchset 23: std::optional<std::string> navigation_type_string_;
          Ken Okada . unresolved

          `navigation_initiator_string_`?

          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc
          Line 96, Patchset 26 (Latest): DLOG(ERROR) << "PreloadServingMetricsPageLoadMetricsObserver::"
          Ken Okada . unresolved

          Remaining printf for debug?

          Line 103, Patchset 23: // `OnFirstContentfulPaintInPage()` is called after `OnCommit()` (or
          Ken Okada . unresolved

          Add newline above.

          Line 113, Patchset 14: // `OnFirstContentfulPaintInPage()` is called after `OnCommit()` (or
          Ken Okada . unresolved

          1. Could you check `PLMO::OnFirstContentfulPaintInPage` is called for BFCache?


          2. Existence of `preload_serving_metrics_capsule_` is important invariant and I'd like to preserve.

          So, if 1 is yes, add `if (is_bf_cache_) { return; }`. If 1 is false, revert it and add a comment for BFCache.

          ---

          If you set PSMC on OnRestoreFromBackForwardCache, the `CHECK` looks to pass.

          Huanpo Lin

          For (1), I believe it is yes. There are some other tests which are not explicitly testing BFCache were failing in the previous patch so I changed this and added the comments.
          I've reverted back to use CHECK and added `has_entered_bfcache_`.
          The `is_bf_cache_(has_restored_from_bfcache_)` is called on restored so it won't work for this part. `has_entered_bfcache_` is introduced instead to prevent this, PTAL whether this pattern is more desired.

          Ken Okada

          If you set PSMC on OnRestoreFromBackForwardCache, the CHECK looks to pass.

          How about this point? This early return prevents to record FCP for navs used BFCache. (Behavioral change if we record. Currently not recorded.)

           // Note that
          // `preload_serving_metrics_capsule_` can be null if the page entered
          // BackForwardCache before FCP occurred (which resets the capsule) or if FCP
          // timing is delivered out of order.

          Is this true? Restore sets PSMC.

          Line 126, Patchset 23:page_load_metrics::PageLoadMetricsObserver::ObservePolicy

          PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache(
          const page_load_metrics::mojom::PageLoadTiming& timing) {
          MaybeRecord();
          has_entered_bfcache_ = true;
          preload_serving_metrics_capsule_.reset();
          return CONTINUE_OBSERVING;
          }
          Hiroki Nakagawa . unresolved

          `MaybeRecord()` was not called on this event before this CL. Is this a fix for an existing bug?

          Ken Okada

          It's OK to record this case, but it's nice to file a bug first. (Splitting a CL is better, but optional.) We should note it as a behavioral change in the commit message at least.

          Line 139, Patchset 23: has_entered_bfcache_ = false;
          Ken Okada . unresolved

          (It should be `= true;`, i.e. nop and we should remove it, as the fact "entered" is not changed.)

          File content/browser/preloading/preload_serving_metrics.cc
          Line 328, Patchset 23: const std::string& navigation_type_string,
          Ken Okada . unresolved

          `navigation_initiator_string`

          Line 330, Patchset 23: bool has_restored_from_bfcache) const {
          Ken Okada . unresolved

          `is_nav_used_bfcache` as `has_restored_from_bfcache` is a predicate for PLMO, but the arg is for navigation and `NavigationHandle`.

          File tools/metrics/histograms/enums.xml
          Line 27365, Patchset 23: <int value="3" label="BFCache"/>
          Ken Okada . unresolved

          [not blocking] as we can postpone this discussion and revise UMAs.

          My personal preference is adding "InitiatedBy" and "Used" or "With" prefix for navigation initiator and used instant load for metrics. (Enum variants would be OK without prefix.) Because metrics names contain multiple infos, like navigation initiator, used instant load, navigation destination, e.g. `PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.{NavigationInitiator}.{UsedInstantLoad}.{NavigationDestination}`. For example, I prefer

          • PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.InitiatedByOmniboxDefaultSearchEngine.WithPrerender.All (or UsedPrerender)
          • PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.InitiatedByOther.WithNoInstantLoad.SRP (or NoInstantLoad?)

          instead of

          • PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.OmniboxDefaultSearchEngine.Prerender.All
          • PreloadServingMetrics.PageLoad.Clients.PaintTiming.NavigationToFirstContentfulPaint.Other.NoInstantLoad.SRP

          as the former are self-descriptive.

          robe...@chromium.org nhi...@chromium.org WDYT?

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Ia4fb4ecf71a80c484dd2097b6c286b5051cb8201
          Gerrit-Change-Number: 8129579
          Gerrit-PatchSet: 26
          Gerrit-Owner: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-Reviewer: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Ken Okada <ken...@chromium.org>
          Gerrit-Reviewer: Max Curran <curr...@chromium.org>
          Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Taiyo Mizuhashi <ta...@chromium.org>
          Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
          Gerrit-Comment-Date: Fri, 24 Jul 2026 08:15:12 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Huanpo Lin <robe...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Ken Okada (Gerrit)

          unread,
          4:29 AM (3 hours ago) 4:29 AM
          to Huanpo Lin, Hiroki Nakagawa, Max Curran, Rakina Zata Amni, Takashi Toyoshima, Taiyo Mizuhashi, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin

          Ken Okada added 2 comments

          File content/browser/preloading/preload_serving_metrics.h
          Line 228, Patchset 14: bool is_bfcache) const;
          Ken Okada . unresolved

          The order should be `is_bfcache`, `navigation_initiator_string` and then `is_srp`, as `is_bfcache` is like the existence of `PSM`.

          Huanpo Lin

          Sorry, I don't quite get this part why the order should be like this? The order currently is also the order of member declaration in the class. Could you rephrase it?

          Ken Okada

          The implementation is

          ```
          void PreloadServingMetrics::RecordPreloadServingMetricsByNavigationInitiator(
          const std::string& navigation_type_string,
          bool is_url_srp,
          bool has_restored_from_bfcache) const {
          UsedInstantLoad type;
          if (has_restored_from_bfcache) {
          type = UsedInstantLoad::kBFCache;
          } else if (prerender_initial_preload_serving_metrics) {
          type = UsedInstantLoad::kPrerender;

          } else if (const auto* prefetch_match = GetMeaningfulPrefetchMatchMetrics();
          prefetch_match && prefetch_match->IsActualMatch()) {
              type = UsedInstantLoad::kPrefetch;
          } else {
          type = UsedInstantLoad::kNoInstantLoad;
          }
          ```

          If we write the receiver as `self` [like in Rust](https://doc.rust-lang.org/std/keyword.self.html),

          ```
          void PreloadServingMetrics::RecordPreloadServingMetricsByNavigationInitiator(
          self, // Used to determine `UsedInstantLoad`
          const std::string& navigation_type_string,
          bool is_url_srp,
          bool has_restored_from_bfcache // Used to determine `UsedInstantLoad`
          ) const {
          ```

          So, I think it's better to collocate:

          ```
          void PreloadServingMetrics::RecordPreloadServingMetricsByNavigationInitiator(
          self, // Used to determine `UsedInstantLoad`
          bool has_restored_from_bfcache // Used to determine `UsedInstantLoad`
          const std::string& navigation_type_string,
          bool is_url_srp,
          ) const {
          ```
          File content/browser/preloading/preload_serving_metrics.cc
          Line 331, Patchset 26 (Latest): UsedInstantLoad type;
          Ken Okada . unresolved

          `type` is vague word, especially if we are handling multiple "type" concepts like `UsedInstantLoad` and `NavigationInitiator`. `used_instant_load` would be better.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Huanpo Lin
          Gerrit-Attention: Huanpo Lin <robe...@chromium.org>
          Gerrit-Comment-Date: Fri, 24 Jul 2026 08:29:01 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Huanpo Lin <robe...@chromium.org>
          Comment-In-Reply-To: Ken Okada <ken...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Ken Okada (Gerrit)

          unread,
          4:40 AM (2 hours ago) 4:40 AM
          to Huanpo Lin, Hiroki Nakagawa, Max Curran, Rakina Zata Amni, Takashi Toyoshima, Taiyo Mizuhashi, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org
          Attention needed from Huanpo Lin

          Ken Okada added 2 comments

          File content/browser/preloading/preload_serving_metrics_unittest.cc
          Line 240, Patchset 26 (Latest):// - A is restored from BackForwardCache.
          Ken Okada . unresolved

          `Navigation B is started and used A, which is restored from BackForwardCache.`

          Line 267, Patchset 26 (Latest):TEST(PreloadServingMetricsTest,
          Ken Okada . unresolved

          Please keep tests minimum and check only one case per test. I couldn't understand what is the core part of this test.

          Gerrit-Comment-Date: Fri, 24 Jul 2026 08:40:16 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Huanpo Lin (Gerrit)

          unread,
          5:14 AM (2 hours ago) 5:14 AM
          to Hiroki Nakagawa, Max Curran, Rakina Zata Amni, Takashi Toyoshima, Taiyo Mizuhashi, Ken Okada, Chromium LUCI CQ, Chromium Metrics Reviews, chromium...@chromium.org, prerendering-reviews, asvitkine...@chromium.org, bmcquad...@chromium.org, csharris...@chromium.org, droger+w...@chromium.org, gavin...@chromium.org, loading-rev...@chromium.org, speed-metrics...@chromium.org, speed-metr...@chromium.org, tburkar...@chromium.org

          Huanpo Lin added 6 comments

          File chrome/browser/page_load_metrics/observers/back_forward_cache_page_load_metrics_observer_browsertest.cc
          Line 773, Patchset 14: GURL url_a(embedded_test_server()->GetURL("a.com", "/title1.html"));
          Takashi Toyoshima . resolved

          nit: Can we use a.test and b.test?
          IIRC, any host will be resolved into the same address, and it just works.

          Huanpo Lin

          Yes, `a.test` and `b.test` will still work.
          But as the other tests in this file use `a.com` and `b.com`, should it also follow the same pattern for consistency?

          Hiroki Nakagawa

          I think it's nice to use domains reserved for tests in general, but you don't need to change the existing usage in this CL.

          Huanpo Lin

          Got it, updated.

          File components/page_load_metrics/browser/observers/preload_serving_metrics_page_load_metrics_observer.cc
          Line 96, Patchset 26: DLOG(ERROR) << "PreloadServingMetricsPageLoadMetricsObserver::"
          Ken Okada . resolved

          Remaining printf for debug?

          Huanpo Lin

          Done

          Line 126, Patchset 23:page_load_metrics::PageLoadMetricsObserver::ObservePolicy
          PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache(
          const page_load_metrics::mojom::PageLoadTiming& timing) {
          MaybeRecord();
          has_entered_bfcache_ = true;
          preload_serving_metrics_capsule_.reset();
          return CONTINUE_OBSERVING;
          }
          Hiroki Nakagawa . resolved

          `MaybeRecord()` was not called on this event before this CL. Is this a fix for an existing bug?

          Huanpo Lin

          Before this CL, `PreloadServingMetricsPageLoadMetricsObserver::OnEnterBackForwardCache` uses the default behavior, calling `OnComplete`, which should be only called once for every PLMO IIUC, and STOP_OBSERVING, and MaybeRecord() is called in `OnComplete`.
          But in this CL, `CONTINUE_OBSERVING` is used and `OnComplete` shouldn't be used as it is not necessarily the end of the PLMO.
          https://chromium-review.git.corp.google.com/c/chromium/src/+/8129579/comment/99f53a3a_b3226559/ explains why it looks like the current patch.

          File content/browser/preloading/preload_serving_metrics.cc
          Line 310, Patchset 14: kNoPreload = 3,
          Ken Okada . resolved

          1. It's not PSMType. How about `UsedInstantLoad`?
          2. I'd like to use `kNoInstantLoad = 0,` as it should be called the default. (And it should be MECE, but "No preloads && Used BFCache" can be satisfied.)
          3. `kPrefetch < kPrerender` as it's the order in preload pipeline.

          ```
          enum class UsedInstantLoad {
          kNoInstantLoad = 0,
          kPrefetch = 1,
          kPrerender = 2,
          kBFCache = 3,
          kMaxValue = kBFCache,
          };
          ```

          cc: nhi...@chromium.org for naming

          Hiroki Nakagawa

          1. It's not PSMType. How about `UsedInstantLoad`?

          +1 to renaming.

          I think I see your point: generally speaking, "Preload" doesn't include BFCache. Personally, I'm not a big fan of using "Instant", since that's just the consequence of the load rather than the loading type itself. However, I don't come up with alternatives, and `UsedInstantLoad` looks appropriate in this situation.

          Huanpo Lin

          Done

          Hiroki Nakagawa

          s/kNoPreload/kNoInstantLoad/

          Also, please update the order.

          Huanpo Lin

          Thanks, updated.

          File content/browser/preloading/preload_serving_metrics_unittest.cc
          Line 242, Patchset 23: base::test::ScopedFeatureList feature_list;

          feature_list.InitWithFeaturesAndParameters(
          {
          {
          features::kPrerender2FallbackPrefetchSpecRules,
          {},
          },
          },
          {});
          Hiroki Nakagawa . resolved

          Why is this needed for BFCache test?

          Huanpo Lin

          It was copied from other cases, but it is actually not needed.
          Removed, thanks.

          Line 272, Patchset 23: base::test::ScopedFeatureList feature_list;

          feature_list.InitWithFeaturesAndParameters(
          {
          {
          features::kPrerender2FallbackPrefetchSpecRules,
          {},
          },
          },
          {});
          Hiroki Nakagawa . resolved

          Ditto.

          Huanpo Lin

          Done

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement is not satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: Ia4fb4ecf71a80c484dd2097b6c286b5051cb8201
          Gerrit-Change-Number: 8129579
          Gerrit-PatchSet: 27
          Gerrit-Owner: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Hiroki Nakagawa <nhi...@chromium.org>
          Gerrit-Reviewer: Huanpo Lin <robe...@chromium.org>
          Gerrit-Reviewer: Ken Okada <ken...@chromium.org>
          Gerrit-Reviewer: Max Curran <curr...@chromium.org>
          Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
          Gerrit-Reviewer: Takashi Toyoshima <toyo...@chromium.org>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Taiyo Mizuhashi <ta...@chromium.org>
          Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
          Gerrit-Comment-Date: Fri, 24 Jul 2026 09:13:51 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Huanpo Lin <robe...@chromium.org>
          Comment-In-Reply-To: Takashi Toyoshima <toyo...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages