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

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

Issue 2798953002: [PageLoadMetrics] Keep track of Ad Sizes on Pages (Closed)
Patch Set: Rebase Created 3 years, 8 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 | « chrome/browser/page_load_metrics/page_load_tracker.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/page_load_metrics/page_load_tracker.cc
diff --git a/chrome/browser/page_load_metrics/page_load_tracker.cc b/chrome/browser/page_load_metrics/page_load_tracker.cc
index 6aab07488e7f4bbe3fb32c3cd0de05d15c483923..c735bb78cd41cbe810ef448a7a3c8edab70814b7 100644
--- a/chrome/browser/page_load_metrics/page_load_tracker.cc
+++ b/chrome/browser/page_load_metrics/page_load_tracker.cc
@@ -481,8 +481,10 @@ void PageLoadTracker::WillProcessNavigationResponse(
// PlzNavigate: NavigationHandle::GetGlobalRequestID() sometimes returns an
// uninitialized GlobalRequestID. Bail early in this case. See
// crbug.com/680841 for details.
- if (content::IsBrowserSideNavigationEnabled() &&
- navigation_handle->GetGlobalRequestID() == content::GlobalRequestID())
+ // TODO(jkarlin): NavigationSimulator is the first unittest framework to hit
+ // this function, and it doesn't provide a GlobalRequestID. Add an ID. See
+ // crbug.com/711352 for details.
+ if (navigation_handle->GetGlobalRequestID() == content::GlobalRequestID())
return;
DCHECK(!navigation_request_id_.has_value());
@@ -505,6 +507,12 @@ void PageLoadTracker::Commit(content::NavigationHandle* navigation_handle) {
LogAbortChainHistograms(navigation_handle);
}
+void PageLoadTracker::DidFinishSubFrameNavigation(
+ content::NavigationHandle* navigation_handle) {
+ INVOKE_AND_PRUNE_OBSERVERS(observers_, OnDidFinishSubFrameNavigation,
+ navigation_handle);
+}
+
void PageLoadTracker::FailedProvisionalLoad(
content::NavigationHandle* navigation_handle,
base::TimeTicks failed_load_time) {
« no previous file with comments | « chrome/browser/page_load_metrics/page_load_tracker.h ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698