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

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

Issue 2876793004: Improve subframe navigation tracking. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c75afcf77008fc1cbe486ffe2a98184705031ce0..c6a2dd46c92d9ed53048c2bb8f35aca62171db0c 100644
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
@@ -313,8 +313,12 @@ MetricsWebContentsObserver::GetPageLoadExtraInfoForCommittedLoad() {
void MetricsWebContentsObserver::DidFinishNavigation(
content::NavigationHandle* navigation_handle) {
- if (!navigation_handle->IsInMainFrame() && committed_load_) {
- committed_load_->DidFinishSubFrameNavigation(navigation_handle);
+ if (!navigation_handle->IsInMainFrame()) {
+ if (committed_load_ && navigation_handle->GetParentFrame() &&
+ GetMainFrame(navigation_handle->GetParentFrame()) ==
+ web_contents()->GetMainFrame()) {
+ committed_load_->DidFinishSubFrameNavigation(navigation_handle);
+ }
return;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698