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

Unified Diff: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc

Issue 2560043004: [PageLoadMetrics] Record bytes usage per page (Closed)
Patch Set: Fix test 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
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/metrics_web_contents_observer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
index 69cfd8981ffdf9c04b3283b4fcd79c42b51c0751..e8bb2aa5848db16e4baf92532ae80cc8ea97b28a 100644
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
@@ -359,6 +359,8 @@ void NotifyUIThreadOfRequestComplete(
bool was_cached,
int net_error,
int64_t total_received_bytes,
+ int64_t raw_body_bytes,
+ base::TimeTicks request_creation_time,
base::TimeDelta request_loading_time) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
content::WebContents* web_contents = web_contents_getter.Run();
@@ -374,7 +376,8 @@ void NotifyUIThreadOfRequestComplete(
page_load_metrics::MetricsWebContentsObserver::FromWebContents(
web_contents);
if (metrics_observer) {
- metrics_observer->OnRequestComplete(resource_type, was_cached, net_error);
+ metrics_observer->OnRequestComplete(resource_type, was_cached,
+ raw_body_bytes, request_creation_time);
}
}
@@ -836,6 +839,7 @@ void ChromeResourceDispatcherHostDelegate::RequestComplete(
info->GetWebContentsGetterForRequest(), url_request->url(),
info->GetResourceType(), url_request->was_cached(), net_error,
url_request->GetTotalReceivedBytes(),
+ url_request->GetRawBodyBytes(), url_request->creation_time(),
base::TimeTicks::Now() - url_request->creation_time()));
}
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/metrics_web_contents_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698