Index: base/trace_event/process_memory_dump.h |
diff --git a/base/trace_event/process_memory_dump.h b/base/trace_event/process_memory_dump.h |
index 889356d65aa57d8599a715ab4cdb5ad062d2aa82..cd70b9c2002ff3c0da4d6504c147e3fe78aae711 100644 |
--- a/base/trace_event/process_memory_dump.h |
+++ b/base/trace_event/process_memory_dump.h |
@@ -41,6 +41,14 @@ class BASE_EXPORT ProcessMemoryDump { |
// Called at trace generation time to populate the TracedValue. |
void AsValueInto(TracedValue* value) const; |
+ // Merges all MemoryAllocatorDump(s) contained in |other| inside this |
+ // ProcessMemoryDump, transferring their ownership to this instance. |
+ // |other| will be an empty ProcessMemoryDump after this method returns. |
+ // This is to allow dump providers to pre-populate ProcessMemoryDump instances |
+ // and later move their contents into the ProcessMemoryDump passed as argument |
+ // of the MemoryDumpProvider::OnMemoryDump(ProcessMemoryDump*) callback. |
+ void TakeAllDumpsFrom(ProcessMemoryDump* other); |
+ |
ProcessMemoryTotals* process_totals() { return &process_totals_; } |
bool has_process_totals() const { return has_process_totals_; } |
void set_has_process_totals() { has_process_totals_ = true; } |