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

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

Issue 2798953002: [PageLoadMetrics] Keep track of Ad Sizes on Pages (Closed)
Patch Set: Rebase Created 3 years, 8 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 | « chrome/browser/BUILD.gn ('k') | 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 a0c7a7b47bb87de9b963d3031bf062ae65e5d38c..e66dcef557edc038c5391f707d2437e6a80ea757 100644
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
@@ -367,6 +367,8 @@ void NotifyUIThreadOfRequestStarted(
void NotifyUIThreadOfRequestComplete(
const content::ResourceRequestInfo::WebContentsGetter& web_contents_getter,
+ const content::ResourceRequestInfo::FrameTreeNodeIdGetter&
+ frame_tree_node_id_getter,
const GURL& url,
const content::GlobalRequestID& request_id,
ResourceType resource_type,
@@ -401,10 +403,10 @@ void NotifyUIThreadOfRequestComplete(
page_load_metrics::MetricsWebContentsObserver::FromWebContents(
web_contents);
if (metrics_observer) {
- metrics_observer->OnRequestComplete(request_id, resource_type, was_cached,
- std::move(data_reduction_proxy_data),
- raw_body_bytes, original_content_length,
- request_creation_time);
+ metrics_observer->OnRequestComplete(
+ url, frame_tree_node_id_getter.Run(), request_id, resource_type,
+ was_cached, std::move(data_reduction_proxy_data), raw_body_bytes,
+ original_content_length, request_creation_time);
}
}
@@ -868,9 +870,10 @@ void ChromeResourceDispatcherHostDelegate::RequestComplete(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::BindOnce(&NotifyUIThreadOfRequestComplete,
- info->GetWebContentsGetterForRequest(), url_request->url(),
- info->GetGlobalRequestID(), info->GetResourceType(),
- url_request->was_cached(),
+ info->GetWebContentsGetterForRequest(),
+ info->GetFrameTreeNodeIdGetterForRequest(),
+ url_request->url(), info->GetGlobalRequestID(),
+ info->GetResourceType(), url_request->was_cached(),
base::Passed(&data_reduction_proxy_data), net_error,
url_request->GetTotalReceivedBytes(),
url_request->GetRawBodyBytes(), original_content_length,
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | 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