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

Unified Diff: components/metrics/metrics_service.cc

Issue 2524363003: Support experiment configurations with/without stability metrics. (Closed)
Patch Set: move experiment check into FileMetricsProvider 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 | « components/metrics/file_metrics_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service.cc
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
index 609782fb7db9e9c791958671977d4e75e96590b2..8e8a1a61ef8778ce0b7044b1a6c3d40bf2e53acf 100644
--- a/components/metrics/metrics_service.cc
+++ b/components/metrics/metrics_service.cc
@@ -916,12 +916,14 @@ void MetricsService::SendNextLog() {
bool MetricsService::ProvidersHaveInitialStabilityMetrics() {
// Check whether any metrics provider has initial stability metrics.
- for (MetricsProvider* provider : metrics_providers_) {
- if (provider->HasInitialStabilityMetrics())
- return true;
- }
+ // All providers are queried (rather than stopping after the first "true"
+ // response) in case they do any kind of setup work in preparation for
+ // the later call to RecordInitialHistogramSnapshots().
+ bool has_stability_metrics = false;
+ for (MetricsProvider* provider : metrics_providers_)
+ has_stability_metrics |= provider->HasInitialStabilityMetrics();
- return false;
+ return has_stability_metrics;
}
bool MetricsService::PrepareInitialStabilityLog(
« no previous file with comments | « components/metrics/file_metrics_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698