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

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

Issue 2593793002: Remove call to WasHidden as part of the app being backgrounded. (Closed)
Patch Set: add comment Created 4 years 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 | chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.h » ('j') | 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 571ef104db8367353264a36aaef54403df502d26..b51abec412d1e3190abe9db62921cd452ee041d5 100644
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc
@@ -308,10 +308,11 @@ void MetricsWebContentsObserver::OnInputEvent(
}
void MetricsWebContentsObserver::FlushMetricsOnAppEnterBackground() {
- // Signal to observers that we've been backgrounded, in cases where the
- // FlushMetricsOnAppEnterBackground callback gets invoked before the
- // associated WasHidden callback.
- WasHidden();
+ // Note that, while a call to FlushMetricsOnAppEnterBackground usually
+ // indicates that the app is about to be backgrounded, there are cases where
+ // the app may not end up getting backgrounded. Thus, we should not assume
+ // anything about foreground / background state of the associated tab as part
+ // of this method call.
if (committed_load_)
committed_load_->FlushMetricsOnAppEnterBackground();
« no previous file with comments | « no previous file | chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698