| Index: components/page_load_metrics/browser/metrics_web_contents_observer.cc
|
| diff --git a/components/page_load_metrics/browser/metrics_web_contents_observer.cc b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
|
| index c5705732f61144dcebb8424f6531183a7ea0638a..4f5d1fbff6d4b7447d264fb87dc2dc4cae55df77 100644
|
| --- a/components/page_load_metrics/browser/metrics_web_contents_observer.cc
|
| +++ b/components/page_load_metrics/browser/metrics_web_contents_observer.cc
|
| @@ -209,6 +209,7 @@ PageLoadTracker::PageLoadTracker(
|
| PageLoadMetricsEmbedderInterface* embedder_interface,
|
| PageLoadTracker* const currently_committed_load_or_null,
|
| content::NavigationHandle* navigation_handle,
|
| + content::WebContents* web_contents,
|
| int aborted_chain_size,
|
| int aborted_chain_size_same_url)
|
| : renderer_tracked_(false),
|
| @@ -221,12 +222,12 @@ PageLoadTracker::PageLoadTracker(
|
| embedder_interface_(embedder_interface) {
|
| DCHECK(!navigation_handle->HasCommitted());
|
| embedder_interface_->RegisterObservers(this);
|
| - const GURL& currently_committed_url =
|
| + const GURL currently_committed_url =
|
| currently_committed_load_or_null
|
| ? currently_committed_load_or_null->committed_url()
|
| : GURL::EmptyGURL();
|
| for (const auto& observer : observers_) {
|
| - observer->OnStart(navigation_handle, currently_committed_url);
|
| + observer->OnStart(navigation_handle, web_contents, currently_committed_url);
|
| }
|
| }
|
|
|
| @@ -524,11 +525,12 @@ void MetricsWebContentsObserver::DidStartNavigation(
|
| // the MetricsWebContentsObserver owns them both list and they are torn down
|
| // after the PageLoadTracker. The PageLoadTracker does not hold on to
|
| // committed_load_ or navigation_handle beyond the scope of the constructor.
|
| - provisional_loads_.insert(std::make_pair(
|
| - navigation_handle,
|
| - make_scoped_ptr(new PageLoadTracker(
|
| - in_foreground_, embedder_interface_.get(), committed_load_.get(),
|
| - navigation_handle, chain_size, chain_size_same_url))));
|
| + provisional_loads_.insert(
|
| + std::make_pair(navigation_handle,
|
| + make_scoped_ptr(new PageLoadTracker(
|
| + in_foreground_, embedder_interface_.get(),
|
| + committed_load_.get(), navigation_handle,
|
| + web_contents(), chain_size, chain_size_same_url))));
|
| }
|
|
|
| void MetricsWebContentsObserver::DidFinishNavigation(
|
|
|