Index: base/trace_event/memory_dump_session_state.h |
diff --git a/base/trace_event/memory_dump_session_state.h b/base/trace_event/memory_dump_session_state.h |
index 8a0320791b529a681803780c6c3e97ae65435d6c..6834471b9a760db062ba02cd1ef6d4f39d3082fe 100644 |
--- a/base/trace_event/memory_dump_session_state.h |
+++ b/base/trace_event/memory_dump_session_state.h |
@@ -8,6 +8,7 @@ |
#include "base/base_export.h" |
#include "base/memory/ref_counted.h" |
#include "base/trace_event/heap_profiler_stack_frame_deduplicator.h" |
+#include "base/trace_event/heap_profiler_type_name_deduplicator.h" |
namespace base { |
namespace trace_event { |
@@ -18,7 +19,8 @@ class BASE_EXPORT MemoryDumpSessionState |
: public RefCountedThreadSafe<MemoryDumpSessionState> { |
public: |
MemoryDumpSessionState( |
- const scoped_refptr<StackFrameDeduplicator>& stack_frame_deduplicator); |
+ const scoped_refptr<StackFrameDeduplicator>& stack_frame_deduplicator, |
+ const scoped_refptr<TypeNameDeduplicator>& type_name_deduplicator); |
// Returns the stack frame deduplicator that should be used by memory dump |
// providers when doing a heap dump. |
@@ -26,6 +28,12 @@ class BASE_EXPORT MemoryDumpSessionState |
return stack_frame_deduplicator_.get(); |
} |
+ // Returns the type name deduplicator that should be used by memory dump |
+ // providers when doing a heap dump. |
+ TypeNameDeduplicator* type_name_deduplicator() { |
+ return type_name_deduplicator_.get(); |
+ } |
+ |
private: |
friend class RefCountedThreadSafe<MemoryDumpSessionState>; |
~MemoryDumpSessionState(); |
@@ -33,6 +41,10 @@ class BASE_EXPORT MemoryDumpSessionState |
// Deduplicates backtraces in heap dumps so they can be written once when the |
// trace is finalized. |
scoped_refptr<StackFrameDeduplicator> stack_frame_deduplicator_; |
+ |
+ // Deduplicates type names in heap dumps so they can be written once when the |
+ // trace is finalized. |
+ scoped_refptr<TypeNameDeduplicator> type_name_deduplicator_; |
}; |
} // namespace trace_event |