Index: base/trace_event/memory_dump_provider.h |
diff --git a/base/trace_event/memory_dump_provider.h b/base/trace_event/memory_dump_provider.h |
index 6e6551cc03988df685fb72d2e489e626ba583ab3..506fc00c362b82c12c24e67399a1e0cb32844fd8 100644 |
--- a/base/trace_event/memory_dump_provider.h |
+++ b/base/trace_event/memory_dump_provider.h |
@@ -13,6 +13,17 @@ namespace trace_event { |
class ProcessMemoryDump; |
+// Contains information about the type of memory dump the MemoryDumpProvider |
+// should generate on dump request. This is to control the size of dumps |
+// generated. |
+struct MemoryDumpArgs { |
+ enum LevelOfDetail { LEVEL_OF_DETAIL_LOW, LEVEL_OF_DETAIL_HIGH }; |
+ |
+ explicit MemoryDumpArgs(const LevelOfDetail level) : level_of_detail(level) {} |
+ |
+ const LevelOfDetail level_of_detail; |
+}; |
+ |
// The contract interface that memory dump providers must implement. |
class BASE_EXPORT MemoryDumpProvider { |
public: |
@@ -21,7 +32,8 @@ class BASE_EXPORT MemoryDumpProvider { |
// false if something went wrong and the dump should be considered invalid. |
// (Note, the MemoryDumpManager has a fail-safe logic which will disable the |
// MemoryDumpProvider for the entire trace session if it fails consistently). |
- virtual bool OnMemoryDump(ProcessMemoryDump* pmd) = 0; |
+ virtual bool OnMemoryDump(const MemoryDumpArgs& args, |
+ ProcessMemoryDump* pmd) = 0; |
protected: |
MemoryDumpProvider() {} |