Commit 048ae580 authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Record SWR candidates for non SWR revalidation requests.

Revalidation requests would get tagged as SWR candidates when
the revalidation occurred causing skew in the histograms.

BUG=348877

Change-Id: I5d713b9d18513337d7ef9379effda8495ddcad4a
Reviewed-on: https://chromium-review.googlesource.com/c/1334662Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608056}
parent ce3170f0
......@@ -742,8 +742,9 @@ base::Optional<ResourceRequestBlockedReason> ResourceFetcher::PrepareRequest(
// stale while revalidate (based on a list of hosts). This allows us
// to only log metrics for sites that would possibly benefit from
// stale while revalidate being enabled.
resource_request.SetStaleRevalidateCandidate(host_matches_allow ||
host_matches_control);
resource_request.SetStaleRevalidateCandidate(
(host_matches_allow || host_matches_control) &&
!params.IsStaleRevalidation());
// Indicate whether the network stack can return a stale resource. If a
// stale resource is returned a StaleRevalidation request will be scheduled.
// Explicitly disallow stale responses for fetchers that don't have SWR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment