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..0eba8a00842ed55724958add9b194109776b61ea 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); |
| + url, frame_tree_node_id, was_cached, raw_body_bytes, |
| + 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_) |
| + committed_load_->CommitSubFrame(navigation_handle); |
|
Charlie Harrison
2017/04/10 18:39:41
DidCommitSubFrame? CommitSubFrame sounds like a di
jkarlin
2017/04/11 16:46:27
Done.
|
| return; |
| + } |
| std::unique_ptr<PageLoadTracker> finished_nav( |
| std::move(provisional_loads_[navigation_handle])); |