Index: components/metrics/metrics_service.cc |
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc |
index 529af17d829491521866ac870048baf24d07d1a7..b6d615f3e86191a6b6b31b71a6e9f3a626ed953a 100644 |
--- a/components/metrics/metrics_service.cc |
+++ b/components/metrics/metrics_service.cc |
@@ -783,9 +783,17 @@ bool MetricsService::PrepareInitialStabilityLog( |
// Do not call NotifyOnDidCreateMetricsLog here because the stability |
// log describes stats from the _previous_ session. |
std::string system_profile_app_version; |
- if (!initial_stability_log->LoadSavedEnvironmentFromPrefs( |
- &system_profile_app_version)) { |
- return false; |
+ for (auto& provider : metrics_providers_) { |
+ if (initial_stability_log->LoadSavedEnvironmentFromProvider( |
+ provider.get(), &system_profile_app_version)) { |
Alexei Svitkine (slow)
2017/05/31 20:31:24
Instead of replacing the profile of the stability
bcwhite
2017/05/31 20:48:29
Currently there is only ever one persistent histog
Alexei Svitkine (slow)
2017/06/01 15:00:29
Per offline discussion, I prefer to not have this
|
+ break; |
+ } |
+ } |
+ if (system_profile_app_version.empty()) { |
+ if (!initial_stability_log->LoadSavedEnvironmentFromPrefs( |
+ &system_profile_app_version)) { |
+ return false; |
+ } |
} |
if (system_profile_app_version != prefs_previous_version) |
StabilityMetricsProvider(local_state_).LogStabilityVersionMismatch(); |