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

Unified Diff: chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer.cc

Issue 2888673002: Add support for counting same-document AMP loads. (Closed)
Patch Set: rebase, and small updates 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
Index: chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer.cc
diff --git a/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer.cc
index 6312cdcf970edfe54a0066375c8d71cfd99d33bb..d25d6d220a9335361e5e4899496305854e785a30 100644
--- a/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer.cc
+++ b/chrome/browser/page_load_metrics/observers/ads_page_load_metrics_observer.cc
@@ -91,8 +91,7 @@ AdsPageLoadMetricsObserver::OnCommit(
return CONTINUE_OBSERVING;
}
-page_load_metrics::PageLoadMetricsObserver::ObservePolicy
-AdsPageLoadMetricsObserver::OnDidFinishSubFrameNavigation(
+void AdsPageLoadMetricsObserver::OnDidFinishSubFrameNavigation(
content::NavigationHandle* navigation_handle) {
// Determine if the frame is part of an existing ad, the root of a new ad,
// or a non-ad frame. Once a frame is labled as an ad, it is always
@@ -115,7 +114,7 @@ AdsPageLoadMetricsObserver::OnDidFinishSubFrameNavigation(
"PageLoad.Clients.Ads.Google.Navigations.AdFrameRenavigatedToAd",
FrameIsAd(navigation_handle));
}
- return CONTINUE_OBSERVING;
+ return;
}
// This frame was previously not an ad, process it as usual. If it had
// any child frames that were ads, those will still be recorded.
@@ -132,7 +131,7 @@ AdsPageLoadMetricsObserver::OnDidFinishSubFrameNavigation(
// it's a frame from a previous navigation.
RecordParentExistsForSubFrame(false /* parent_exists */);
- return CONTINUE_OBSERVING;
+ return;
}
RecordParentExistsForSubFrame(true /* parent_exists */);
@@ -147,7 +146,6 @@ AdsPageLoadMetricsObserver::OnDidFinishSubFrameNavigation(
ad_frames_data_[frame_tree_node_id] = ad_data;
ProcessOngoingNavigationResource(frame_tree_node_id);
- return CONTINUE_OBSERVING;
}
page_load_metrics::PageLoadMetricsObserver::ObservePolicy

Powered by Google App Engine
This is Rietveld 408576698