Index: base/trace_event/memory_allocator_dump.h |
diff --git a/base/trace_event/memory_allocator_dump.h b/base/trace_event/memory_allocator_dump.h |
index c781f071bba40ab08c25dcb18ec1f59fc1b1fc12..99ff114e5c78a28dedb2667e7c3a1b95a1726f82 100644 |
--- a/base/trace_event/memory_allocator_dump.h |
+++ b/base/trace_event/memory_allocator_dump.h |
@@ -11,6 +11,7 @@ |
#include <string> |
#include "base/base_export.h" |
+#include "base/gtest_prod_util.h" |
#include "base/logging.h" |
#include "base/macros.h" |
#include "base/trace_event/memory_allocator_dump_guid.h" |
@@ -85,11 +86,21 @@ class BASE_EXPORT MemoryAllocatorDump { |
TracedValue* attributes_for_testing() const { return attributes_.get(); } |
private: |
+ // TODO(hjd): Transitional until we send the full PMD. See crbug.com/704203 |
+ friend class MemoryDumpManager; |
+ FRIEND_TEST_ALL_PREFIXES(MemoryAllocatorDumpTest, GetSize); |
+ |
+ // Get the size for this dump. |
+ // The size is the value set with AddScalar(kNameSize, kUnitsBytes, size); |
+ // TODO(hjd): Transitional until we send the full PMD. See crbug.com/704203 |
+ uint64_t GetSize() const { return size_; }; |
+ |
const std::string absolute_name_; |
ProcessMemoryDump* const process_memory_dump_; // Not owned (PMD owns this). |
std::unique_ptr<TracedValue> attributes_; |
MemoryAllocatorDumpGuid guid_; |
int flags_; // See enum Flags. |
+ uint64_t size_; |
// A local buffer for Sprintf conversion on fastpath. Avoids allocating |
// temporary strings on each AddScalar() call. |