Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: third_party/WebKit/Source/platform/web_memory_allocator_dump_impl.h

Issue 2028483002: Remove abstract classes for memory dumper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef WebMemoryAllocatorDumpImpl_h
6 #define WebMemoryAllocatorDumpImpl_h
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "platform/WebMemoryAllocatorDump.h"
12
13 namespace base {
14 namespace trace_event {
15 class MemoryAllocatorDump;
16 } // namespace base
17 } // namespace trace_event
18
19 namespace blink {
20
21 // Implements the blink::WebMemoryAllocatorDump interface by means of proxying
22 // the Add*() calls to the underlying base::trace_event::MemoryAllocatorDump
23 // instance.
24 class WebMemoryAllocatorDumpImpl : public blink::WebMemoryAllocatorDump {
25 public:
26 explicit WebMemoryAllocatorDumpImpl(
27 base::trace_event::MemoryAllocatorDump* memory_allocator_dump);
28 ~WebMemoryAllocatorDumpImpl() override;
29
30 // blink::WebMemoryAllocatorDump implementation.
31 void addScalar(const char* name, const char* units, uint64_t value) override;
32 void addScalarF(const char* name, const char* units, double value) override;
33 void addString(const char* name,
34 const char* units,
35 const blink::WebString& value) override;
36
37 blink::WebMemoryAllocatorDumpGuid guid() const override;
38
39 private:
40 base::trace_event::MemoryAllocatorDump* memory_allocator_dump_; // Not owned.
41 blink::WebMemoryAllocatorDumpGuid guid_;
42
43 DISALLOW_COPY_AND_ASSIGN(WebMemoryAllocatorDumpImpl);
44 };
45
46 } // namespace blink
47
48 #endif // WebMemoryAllocatorDumpImpl_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698