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 7a8b8068352ca5c8a85c0f139043e4cc4eeb812f..d5db10f08c0cdb69c6aec635ac8947200ca115b7 100644 |
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
@@ -274,6 +274,8 @@ void MetricsWebContentsObserver::OnRequestStarted( |
} |
void MetricsWebContentsObserver::OnRequestComplete( |
+ const GURL& url, |
+ int frame_tree_node_id, |
const content::GlobalRequestID& request_id, |
content::ResourceType resource_type, |
bool was_cached, |
@@ -286,7 +288,8 @@ void MetricsWebContentsObserver::OnRequestComplete( |
GetTrackerOrNullForRequest(request_id, resource_type, creation_time); |
if (tracker) { |
ExtraRequestCompleteInfo extra_request_complete_info( |
- was_cached, raw_body_bytes, was_cached ? 0 : original_content_length, |
+ url, frame_tree_node_id, was_cached, raw_body_bytes, |
+ was_cached ? 0 : original_content_length, |
std::move(data_reduction_proxy_data), resource_type); |
tracker->OnLoadedResource(extra_request_complete_info); |
} |
@@ -310,8 +313,10 @@ MetricsWebContentsObserver::GetPageLoadExtraInfoForCommittedLoad() { |
void MetricsWebContentsObserver::DidFinishNavigation( |
content::NavigationHandle* navigation_handle) { |
- if (!navigation_handle->IsInMainFrame()) |
+ if (!navigation_handle->IsInMainFrame() && committed_load_) { |
+ committed_load_->DidFinishSubFrameNavigation(navigation_handle); |
return; |
+ } |
std::unique_ptr<PageLoadTracker> finished_nav( |
std::move(provisional_loads_[navigation_handle])); |