Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(249)

Unified Diff: content/browser/loader/resource_loader.cc

Issue 2930353005: PlzNavigate: Add metrics to understand bf navigations PLT regression (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/loader/resource_loader.cc
diff --git a/content/browser/loader/resource_loader.cc b/content/browser/loader/resource_loader.cc
index d2a1bb1945d964138dc397963ac3b25c743c83b9..61562815dd409b7c94b2cab0862a20fee6bee2df 100644
--- a/content/browser/loader/resource_loader.cc
+++ b/content/browser/loader/resource_loader.cc
@@ -646,6 +646,16 @@ void ResourceLoader::CompleteResponseStarted() {
delegate_->DidReceiveResponse(this, response.get());
+ // For back-forward navigations, record metrics.
+ // TODO(clamy): Remove once we understand the root cause behind the regression
+ // of PLT for b/f navigations in PlzNavigate.
+ if ((info->GetPageTransition() & ui::PAGE_TRANSITION_FORWARD_BACK) &&
+ IsResourceTypeFrame(info->GetResourceType()) &&
+ !request_->url().SchemeIsBlob()) {
+ UMA_HISTOGRAM_BOOLEAN("Navigation.BackForward.WasCached",
+ request_->was_cached());
+ }
+
read_deferral_start_time_ = base::TimeTicks::Now();
// Using a ScopedDeferral here would result in calling ReadMore(true) on sync
// success. Calling PrepareToReadMore(false) here instead allows small

Powered by Google App Engine
This is Rietveld 408576698