| 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 0d15216c24b23715201435999c527e6b5e2e46ba..67cad45b5a4d620115cbf166eba4a3294c1cbbc7 100644
|
| --- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
|
| +++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
|
| @@ -271,6 +271,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,
|
| @@ -283,7 +285,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);
|
| }
|
| @@ -307,8 +310,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]));
|
|
|