Chromium Code Reviews| 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..b4df14e39ddfeba6ef830f3febee40512fdc879a 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,16 +86,26 @@ 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; |
| + |
| 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_; |
| + |
| + // 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(); |
| // A local buffer for Sprintf conversion on fastpath. Avoids allocating |
| // temporary strings on each AddScalar() call. |
| std::string string_conversion_buffer_; |
| + FRIEND_TEST_ALL_PREFIXES(MemoryAllocatorDumpTest, GetSize); |
|
Primiano Tucci (use gerrit)
2017/03/23 15:50:49
nit: IIRC this should go up just below friend.
hjd
2017/03/23 16:16:39
Done.
|
| DISALLOW_COPY_AND_ASSIGN(MemoryAllocatorDump); |
| }; |