Index: base/memory/shared_memory_handle.cc |
diff --git a/base/memory/shared_memory_handle.cc b/base/memory/shared_memory_handle.cc |
index 085bde46c295d502f6bc78012923308ba1c3045c..4420cf4f271332bdbde09fe3f10032beed131da1 100644 |
--- a/base/memory/shared_memory_handle.cc |
+++ b/base/memory/shared_memory_handle.cc |
@@ -20,4 +20,16 @@ size_t SharedMemoryHandle::GetSize() const { |
return size_; |
} |
+std::string SharedMemoryHandle::GetGUIDNameForTracing() const { |
+ return "shared_memory/" + GetGUID().ToString(); |
+} |
+ |
+trace_event::MemoryAllocatorDumpGuid SharedMemoryHandle::GetGUIDForTracing() |
+ const { |
+ auto name = GetGUIDNameForTracing(); |
+ if (name.empty()) |
+ return base::trace_event::MemoryAllocatorDumpGuid(); |
+ return base::trace_event::MemoryAllocatorDumpGuid(name); |
+} |
+ |
} // namespace base |