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

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

Issue 2478903002: DRP metrics observer stop observing after hidden (Closed)
Patch Set: bmcquade comments Created 4 years, 1 month 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_metrics_observer.cc ('k') | 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/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 9a5b8197d26e1ae3fa04de51a109c8e5b8978af8..4e672640c8ea38e1e8694db2ad75263a566890b9 100644
--- a/chrome/browser/page_load_metrics/page_load_tracker.cc
+++ b/chrome/browser/page_load_metrics/page_load_tracker.cc
@@ -406,22 +406,22 @@ void PageLoadTracker::WebContentsHidden() {
background_time_ = base::TimeTicks::Now();
ClampBrowserTimestampIfInterProcessTimeTickSkew(&background_time_);
// Though most cases where a tab is backgrounded are user initiated, we
// can't be certain that we were backgrounded due to a user action. For
// example, on Android, the screen times out after a period of inactivity,
// resulting in a non-user-initiated backgrounding.
const bool abort_is_user_initiated = false;
NotifyAbort(ABORT_BACKGROUND, abort_is_user_initiated, background_time_,
true);
}
-
- INVOKE_AND_PRUNE_OBSERVERS(observers_, OnHidden);
+ const PageLoadExtraInfo info = ComputePageLoadExtraInfo();
+ INVOKE_AND_PRUNE_OBSERVERS(observers_, OnHidden, timing_, info);
}
void PageLoadTracker::WebContentsShown() {
// Only log the first time we foreground in a given page load.
if (foreground_time_.is_null()) {
// Make sure we either started in the background and haven't been
// backgrounded yet, or started in the foreground and have already been
// backgrounded.
DCHECK_NE(started_in_foreground_, background_time_.is_null());
foreground_time_ = base::TimeTicks::Now();
« no previous file with comments | « chrome/browser/page_load_metrics/page_load_metrics_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698