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

Unified Diff: components/metrics/metrics_provider.h

Issue 2175743002: Add MetricsProvider::OnAppEnterBackground callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 5 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 | « no previous file | components/metrics/metrics_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_provider.h
diff --git a/components/metrics/metrics_provider.h b/components/metrics/metrics_provider.h
index 6a690f5251c893f7853e4f466cff590e611b011f..d76b6772ccd2288542f16619d70d53d715099ea9 100644
--- a/components/metrics/metrics_provider.h
+++ b/components/metrics/metrics_provider.h
@@ -36,6 +36,13 @@ class MetricsProvider {
// Called when metrics recording has been disabled.
virtual void OnRecordingDisabled();
+ // Called when the application is going into background mode, on platforms
+ // where applications may be killed when going into the background (Android,
+ // iOS). Providers that buffer histogram data in memory should persist
+ // histograms in this callback, as the application may be killed without
+ // further notification after this callback.
+ virtual void OnAppEnterBackground();
+
// Provides additional metrics into the system profile.
virtual void ProvideSystemProfileMetrics(
SystemProfileProto* system_profile_proto);
« no previous file with comments | « no previous file | components/metrics/metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698