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..f046fee316fb768a53703833ea8a0a86753bc041 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); |
| + |
| 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(); |
|
Primiano Tucci (use gerrit)
2017/03/24 11:39:21
ups sorry just realized this, two small nits:
1. f
hjd
2017/03/24 11:57:16
Thanks, done!
|
| // A local buffer for Sprintf conversion on fastpath. Avoids allocating |
| // temporary strings on each AddScalar() call. |