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

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

Issue 2798953002: [PageLoadMetrics] Keep track of Ad Sizes on Pages (Closed)
Patch Set: Address comments from PS11-13 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
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 060b362339230c493d70c4a7b6e5a97d5dbd314c..74d38e309c098a4762841c786221b331f4ec3aee 100644
--- a/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc
@@ -347,6 +347,8 @@ void LogMainFrameMetricsOnUIThread(const GURL& url,
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,
@@ -381,8 +383,9 @@ void NotifyUIThreadOfRequestComplete(
web_contents);
if (metrics_observer) {
metrics_observer->OnRequestComplete(
- request_id, resource_type, was_cached, used_data_reduction_proxy,
- raw_body_bytes, original_content_length, request_creation_time);
+ url, frame_tree_node_id_getter.Run(), request_id, resource_type,
+ was_cached, used_data_reduction_proxy, raw_body_bytes,
+ original_content_length, request_creation_time);
}
}
@@ -852,7 +855,8 @@ void ChromeResourceDispatcherHostDelegate::RequestComplete(
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(&NotifyUIThreadOfRequestComplete,
- info->GetWebContentsGetterForRequest(), url_request->url(),
+ info->GetWebContentsGetterForRequest(),
+ info->GetFrameTreeNodeIdGetterForRequest(), url_request->url(),
info->GetGlobalRequestID(), info->GetResourceType(),
url_request->was_cached(), used_data_reduction_proxy,
net_error, url_request->GetTotalReceivedBytes(),

Powered by Google App Engine
This is Rietveld 408576698