Chromium Code Reviews| 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 e3f51bf4946a1b2cc9437a0e973f4b77a78e5325..56943f94a9c8eb31561527bf3ff81d33aa6dc8e2 100644 |
| --- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
| +++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
| @@ -245,6 +245,8 @@ PageLoadTracker* MetricsWebContentsObserver::GetTrackerOrNullForRequest( |
| } |
| void MetricsWebContentsObserver::OnRequestComplete( |
| + const GURL& url, |
| + int frame_tree_node_id, |
| const content::GlobalRequestID& request_id, |
| content::ResourceType resource_type, |
| bool was_cached, |
| @@ -256,8 +258,8 @@ void MetricsWebContentsObserver::OnRequestComplete( |
| GetTrackerOrNullForRequest(request_id, resource_type, creation_time); |
| if (tracker) { |
| ExtraRequestInfo extra_request_info( |
| - was_cached, raw_body_bytes, used_data_reduction_proxy, |
| - was_cached ? 0 : original_content_length); |
| + std::move(url), frame_tree_node_id, was_cached, raw_body_bytes, |
|
Bryan McQuade
2017/04/12 15:01:17
we chatted about this & I think you concluded that
jkarlin
2017/04/13 17:25:30
Done.
|
| + used_data_reduction_proxy, was_cached ? 0 : original_content_length); |
| tracker->OnLoadedResource(extra_request_info); |
| } |
| } |
| @@ -270,8 +272,11 @@ MetricsWebContentsObserver::GetPageLoadExtraInfoForCommittedLoad() { |
| void MetricsWebContentsObserver::DidFinishNavigation( |
| content::NavigationHandle* navigation_handle) { |
| - if (!navigation_handle->IsInMainFrame()) |
| + if (!navigation_handle->IsInMainFrame()) { |
| + if (committed_load_ && navigation_handle->HasCommitted()) |
| + committed_load_->DidCommitSubFrame(navigation_handle); |
| return; |
| + } |
| std::unique_ptr<PageLoadTracker> finished_nav( |
| std::move(provisional_loads_[navigation_handle])); |