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 58f4856a62e20a7424b33c4f64c7f561460547b2..776caac034cb04fff880ae007f7239e291872db6 100644 |
| --- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
| +++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
| @@ -157,7 +157,8 @@ void MetricsWebContentsObserver::WillStartNavigationRequest( |
| ? web_contents()->GetOpener()->GetLastCommittedURL() |
| : GURL::EmptyGURL(); |
| const GURL& currently_committed_url = |
| - committed_load_ ? committed_load_->committed_url() : opener_url; |
| + committed_load_ && committed_load_->did_commit() ? committed_load_->url() |
|
jkarlin
2017/02/15 19:55:36
committed_load_->did_commit() must be true, right?
Bryan McQuade
2017/02/15 20:27:10
Done, thanks!
I added the DCHECK at the location
|
| + : opener_url; |
| has_navigated_ = true; |
| // We can have two provisional loads in some cases. E.g. a same-site |