Chromium Code Reviews| Index: third_party/WebKit/public/platform/WebMemoryAllocatorDump.h |
| diff --git a/third_party/WebKit/public/platform/WebMemoryAllocatorDump.h b/third_party/WebKit/public/platform/WebMemoryAllocatorDump.h |
| index 6d1fefe8aaf79bbc26267a56619a4d5ce5e103de..80f655ed695c57f358f1cd99f859a64a0ce2da4c 100644 |
| --- a/third_party/WebKit/public/platform/WebMemoryAllocatorDump.h |
| +++ b/third_party/WebKit/public/platform/WebMemoryAllocatorDump.h |
| @@ -7,6 +7,15 @@ |
| #include "WebCommon.h" |
| #include "WebString.h" |
| +#include "base/macros.h" |
| + |
| +#include <stdint.h> |
| + |
| +namespace base { |
| +namespace trace_event { |
| +class MemoryAllocatorDump; |
| +} // namespace base |
| +} // namespace trace_event |
| namespace blink { |
| typedef uint64_t WebMemoryAllocatorDumpGuid; |
| @@ -15,7 +24,8 @@ typedef uint64_t WebMemoryAllocatorDumpGuid; |
| // allocator. |
| class BLINK_PLATFORM_EXPORT WebMemoryAllocatorDump { |
| public: |
| - virtual ~WebMemoryAllocatorDump(); |
| + explicit WebMemoryAllocatorDump(base::trace_event::MemoryAllocatorDump*); |
| + ~WebMemoryAllocatorDump(); |
| // Adds a scalar attribute to the dump. |
| // Arguments: |
| @@ -25,9 +35,9 @@ public: |
| // about the semantics of the attribute. |
| // Currently supported values are "bytes" and "objects". |
| // value: the value of the attribute. |
| - virtual void addScalar(const char* name, const char* units, uint64_t value) {} |
| - virtual void addScalarF(const char* name, const char* units, double value) {} |
| - virtual void addString(const char* name, const char* units, const WebString& value) {} |
| + void addScalar(const char* name, const char* units, uint64_t value); |
| + void addScalarF(const char* name, const char* units, double value); |
| + void addString(const char* name, const char* units, const WebString& value); |
| // |guid| is an optional global dump identifier, unique across all processes |
| // within the scope of a global dump. It is only required when using the |
| @@ -35,11 +45,13 @@ public: |
| // cross process sharing. See crbug.com/492102 for design docs. |
| // Subsequent MemoryAllocatorDump(s) with the same |absolute_name| are |
| // expected to have the same guid. |
| - virtual WebMemoryAllocatorDumpGuid guid() const |
| - { |
| - BLINK_ASSERT_NOT_REACHED(); |
| - return 0; |
| - } |
| + WebMemoryAllocatorDumpGuid guid() const; |
| + |
| +private: |
| + base::trace_event::MemoryAllocatorDump* m_memoryAllocatorDump; // Not owned. |
| + blink::WebMemoryAllocatorDumpGuid m_guid; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(WebMemoryAllocatorDump); |
|
haraken
2016/02/25 14:38:55
yutak@ has a plan to replace WTF_MAKE_NONCOPYABLE
hajimehoshi
2016/02/26 11:06:00
Is it allowed to use wtf/Noncopyable.h from public
haraken
2016/02/26 11:20:49
I think it's ok. public/platform/ already includes
hajimehoshi
2016/02/26 11:26:13
As for headers in public/platform, they use INSIDE
haraken
2016/02/26 11:32:17
No one in public/ is using DISALLOW_COPY_AND_ASSIG
hajimehoshi
2016/02/26 12:04:51
Done.
|
| }; |
| } // namespace blink |