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

Unified Diff: chrome/browser/page_load_metrics/metrics_web_contents_observer.cc

Issue 2619243003: Adding ExtraRequest info and exposing request to PLM observers (Closed)
Patch Set: comments Created 3 years, 11 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: chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
diff --git a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
index da214d8fa666dbbc50236ca1df3e19b317d33f16..926978a722908430d4ab523137ffa0f6886562dd 100644
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
@@ -178,7 +178,9 @@ void MetricsWebContentsObserver::WillStartNavigationRequest(
void MetricsWebContentsObserver::OnRequestComplete(
content::ResourceType resource_type,
bool was_cached,
+ bool used_data_reduction_proxy,
int64_t raw_body_bytes,
+ int64_t original_content_length,
base::TimeTicks creation_time) {
// If the navigation hasn't committed yet then we'll miss the resource (this
// happens on the new tab page). Also, if the resource request was started
@@ -191,7 +193,11 @@ void MetricsWebContentsObserver::OnRequestComplete(
return;
}
- committed_load_->OnLoadedResource(was_cached, raw_body_bytes);
+ ExtraRequestInfo extra_request_info(was_cached, raw_body_bytes,
+ used_data_reduction_proxy,
+ was_cached ? 0 : original_content_length);
+
+ committed_load_->OnLoadedResource(extra_request_info);
}
const PageLoadExtraInfo

Powered by Google App Engine
This is Rietveld 408576698