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

Unified Diff: third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h

Issue 1642023007: Refactoring: Move functions from WebMemoryDumpProviderAdapter to PartitionAllocMemoryDumpProvider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: primiano's review Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h
diff --git a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h
index 84601b2299a0c66b5266d6d3214d802278ef5961..15ec7ac642d306295961703f6b99d9882b6b4df6 100644
--- a/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h
+++ b/third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.h
@@ -9,6 +9,16 @@
#include "public/platform/WebMemoryDumpProvider.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
+#include "wtf/OwnPtr.h"
+#include "wtf/ThreadingPrimitives.h"
+
+namespace base {
+namespace trace_event {
+
+class AllocationRegister;
+
+} // namespace trace_event
+} // namespace base
namespace blink {
@@ -22,10 +32,18 @@ public:
// WebMemoryDumpProvider implementation.
bool onMemoryDump(WebMemoryDumpLevelOfDetail, WebProcessMemoryDump*) override;
bool supportsHeapProfiling() override { return true; }
- void onHeapProfilingEnabled(AllocationHook*, FreeHook*) override;
+ void onHeapProfilingEnabled(bool) override;
+
+ // These methods are called only from PartitionAllocHooks' callbacks.
+ void insert(void*, size_t, const char*);
+ void remove(void*);
private:
PartitionAllocMemoryDumpProvider();
+
+ Mutex m_allocationRegisterMutex;
+ OwnPtr<base::trace_event::AllocationRegister> m_allocationRegister;
+ bool m_isHeapProfilingEnabled;
};
} // namespace blink
« no previous file with comments | « content/child/web_process_memory_dump_impl.cc ('k') | third_party/WebKit/Source/platform/PartitionAllocMemoryDumpProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698