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

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

Issue 2560043004: [PageLoadMetrics] Record bytes usage per page (Closed)
Patch Set: Add test Created 4 years 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 571ef104db8367353264a36aaef54403df502d26..9b8328b64a19ff7b657e33167a51b46bbc716705 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,8 @@ void MetricsWebContentsObserver::WillStartNavigationRequest(
void MetricsWebContentsObserver::OnRequestComplete(
content::ResourceType resource_type,
bool was_cached,
- int net_error) {
+ int net_error,
+ int64_t raw_body_bytes) {
// For simplicity, only count subresources. Navigations are hard to attribute
// here because we won't have a committed load by the time data streams in
// from the IO thread.
@@ -188,7 +189,7 @@ void MetricsWebContentsObserver::OnRequestComplete(
}
if (!committed_load_)
return;
- committed_load_->OnLoadedSubresource(was_cached);
+ committed_load_->OnLoadedSubresource(was_cached, raw_body_bytes);
}
const PageLoadExtraInfo

Powered by Google App Engine
This is Rietveld 408576698