Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Unified Diff: chrome/browser/page_load_metrics/metrics_web_contents_observer.cc

Issue 2692373003: Refactor PageLoadExtraInfo::committed_url to url and did_commit fields. (Closed)
Patch Set: fix test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698