Index: base/trace_event/memory_dump_request_args.cc |
diff --git a/base/trace_event/memory_dump_request_args.cc b/base/trace_event/memory_dump_request_args.cc |
index e6c5b87b22684b56f399d6a21bd0f55b4244947a..cb002176675d339ca7e2cd13f7b776533645578f 100644 |
--- a/base/trace_event/memory_dump_request_args.cc |
+++ b/base/trace_event/memory_dump_request_args.cc |
@@ -20,11 +20,28 @@ const char* MemoryDumpTypeToString(const MemoryDumpType& dump_type) { |
return "periodic_interval"; |
case MemoryDumpType::EXPLICITLY_TRIGGERED: |
return "explicitly_triggered"; |
+ case MemoryDumpType::PEAK_MEMORY_USAGE: |
+ return "peak_memory_usage"; |
} |
NOTREACHED(); |
return "unknown"; |
} |
+MemoryDumpType StringToMemoryDumpType(const std::string& str) { |
+ if (str == "task_begin") |
+ return MemoryDumpType::TASK_BEGIN; |
+ if (str == "task_end") |
+ return MemoryDumpType::TASK_END; |
+ if (str == "periodic_interval") |
+ return MemoryDumpType::PERIODIC_INTERVAL; |
+ if (str == "explicitly_triggered") |
+ return MemoryDumpType::EXPLICITLY_TRIGGERED; |
+ if (str == "peak_memory_usage") |
+ return MemoryDumpType::PEAK_MEMORY_USAGE; |
+ NOTREACHED(); |
+ return MemoryDumpType::LAST; |
+} |
+ |
const char* MemoryDumpLevelOfDetailToString( |
const MemoryDumpLevelOfDetail& level_of_detail) { |
switch (level_of_detail) { |