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

Unified Diff: chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_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 | « chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.h ('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/observers/data_reduction_proxy_metrics_observer.cc
diff --git a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc
index 50fc1417bf68e062ae617a7bffdfe7759d93106c..50e1cdbaa1ab92012a541d2ad8bb643fb5b59d33 100644
--- a/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc
+++ b/chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.cc
@@ -132,6 +132,18 @@ DataReductionProxyMetricsObserver::OnHidden(
return STOP_OBSERVING;
}
+page_load_metrics::PageLoadMetricsObserver::ObservePolicy
+DataReductionProxyMetricsObserver::FlushMetricsOnAppEnterBackground(
+ const page_load_metrics::PageLoadTiming& timing,
+ const page_load_metrics::PageLoadExtraInfo& info) {
+ // FlushMetricsOnAppEnterBackground is invoked on Android in cases where the
+ // app is about to be backgrounded, as part of the Activity.onPause()
+ // flow. After this method is invoked, Chrome may be killed without further
+ // notification, so we send a pingback with data collected up to this point.
+ SendPingback(timing, info);
+ return STOP_OBSERVING;
+}
+
void DataReductionProxyMetricsObserver::OnComplete(
const page_load_metrics::PageLoadTiming& timing,
const page_load_metrics::PageLoadExtraInfo& info) {
« no previous file with comments | « chrome/browser/page_load_metrics/observers/data_reduction_proxy_metrics_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698