Index: components/metrics/file_metrics_provider.cc |
diff --git a/components/metrics/file_metrics_provider.cc b/components/metrics/file_metrics_provider.cc |
index d9a6a042c23ce137a1f0deac417e7f81ffb61f14..956c3cfd67ac9913345f72cd8d1f8ac81a7957f3 100644 |
--- a/components/metrics/file_metrics_provider.cc |
+++ b/components/metrics/file_metrics_provider.cc |
@@ -20,6 +20,7 @@ |
#include "base/time/time.h" |
#include "components/metrics/metrics_pref_names.h" |
#include "components/metrics/metrics_service.h" |
+#include "components/metrics/persistent_system_profile.h" |
#include "components/prefs/pref_registry_simple.h" |
#include "components/prefs/pref_service.h" |
@@ -487,6 +488,18 @@ void FileMetricsProvider::OnDidCreateMetricsLog() { |
sources_for_previous_run_.clear(); |
} |
+bool FileMetricsProvider::ProvideStabilitySystemProfile( |
+ SystemProfileProto* system_profile_proto) { |
+ for (const std::unique_ptr<SourceInfo>& source : sources_for_previous_run_) { |
+ DCHECK(source->allocator); |
+ if (PersistentSystemProfile::GetSystemProfile( |
+ *source->allocator->memory_allocator(), system_profile_proto)) { |
+ return true; |
+ } |
+ } |
+ return false; |
+} |
+ |
bool FileMetricsProvider::HasInitialStabilityMetrics() { |
DCHECK(thread_checker_.CalledOnValidThread()); |