Index: components/sync/model/model_type_debug_info.cc |
diff --git a/components/sync/model/model_type_debug_info.cc b/components/sync/model/model_type_debug_info.cc |
index f2f1dfdd09d9575b4855a6429a4ecbac136a67c8..58887cc3a8f9a1a8c61ad26b3810e61427460de4 100644 |
--- a/components/sync/model/model_type_debug_info.cc |
+++ b/components/sync/model/model_type_debug_info.cc |
@@ -9,6 +9,7 @@ |
#include "base/bind.h" |
#include "base/memory/ptr_util.h" |
+#include "components/sync/base/data_type_histogram.h" |
#include "components/sync/model_impl/processor_entity_tracker.h" |
#include "components/sync/protocol/proto_value_conversions.h" |
@@ -59,6 +60,15 @@ void ModelTypeDebugInfo::GetStatusCounters( |
} |
} |
+// static |
+void ModelTypeDebugInfo::RecordMemoryUsageHistogram( |
+ ModelTypeSyncBridge* bridge) { |
+ SharedModelTypeProcessor* processor = GetProcessorFromBridge(bridge); |
+ size_t memory_usage = processor->EstimateMemoryUsage(); |
+ SyncRecordMemoryKbHistogram(kModelTypeMemoryHistogramPrefix, processor->type_, |
+ memory_usage); |
+} |
+ |
ModelTypeDebugInfo::ModelTypeDebugInfo() {} |
// static |