Index: base/trace_event/trace_config.cc |
diff --git a/base/trace_event/trace_config.cc b/base/trace_event/trace_config.cc |
index 9f0367bd2a21b09789ac81f060639f375caf1f73..6d03f5b8ba29a3ea728dc53300ad06e22c1574fc 100644 |
--- a/base/trace_event/trace_config.cc |
+++ b/base/trace_event/trace_config.cc |
@@ -252,6 +252,16 @@ void TraceConfig::Clear() { |
memory_dump_config_.clear(); |
} |
+bool TraceConfig::IsDetailedMemoryDumpEnabled() const { |
+ if (IsCategoryEnabled(MemoryDumpManager::kTraceCategory)) { |
+ for (const MemoryDumpTriggerConfig& config : memory_dump_config_) { |
+ if (config.level_of_detail == MemoryDumpLevelOfDetail::DETAILED) |
+ return true; |
+ } |
+ } |
+ return false; |
+} |
+ |
void TraceConfig::InitializeDefault() { |
record_mode_ = RECORD_UNTIL_FULL; |
enable_sampling_ = false; |