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

Unified Diff: content/child/child_discardable_shared_memory_manager.h

Issue 1100073004: Adding discardable memory dump provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing c_str parameter to string. Created 5 years, 7 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
« no previous file with comments | « no previous file | content/child/child_discardable_shared_memory_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_discardable_shared_memory_manager.h
diff --git a/content/child/child_discardable_shared_memory_manager.h b/content/child/child_discardable_shared_memory_manager.h
index 881b59ec1dfe69a179af749bccb9e963faf4148c..27f5f5e3034b3ae15f1ef0eadabdd30414e631c0 100644
--- a/content/child/child_discardable_shared_memory_manager.h
+++ b/content/child/child_discardable_shared_memory_manager.h
@@ -8,6 +8,7 @@
#include "base/memory/discardable_memory_allocator.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
+#include "base/trace_event/memory_dump_provider.h"
#include "content/child/thread_safe_sender.h"
#include "content/common/content_export.h"
#include "content/common/discardable_shared_memory_heap.h"
@@ -18,7 +19,8 @@ namespace content {
// Implementation of DiscardableMemoryAllocator that allocates
// discardable memory segments through the browser process.
class CONTENT_EXPORT ChildDiscardableSharedMemoryManager
- : public base::DiscardableMemoryAllocator {
+ : public base::DiscardableMemoryAllocator,
+ public base::trace_event::MemoryDumpProvider {
public:
explicit ChildDiscardableSharedMemoryManager(ThreadSafeSender* sender);
~ChildDiscardableSharedMemoryManager() override;
@@ -27,6 +29,9 @@ class CONTENT_EXPORT ChildDiscardableSharedMemoryManager
scoped_ptr<base::DiscardableMemory> AllocateLockedDiscardableMemory(
size_t size) override;
+ // Overridden from base::trace_event::MemoryDumpProvider:
+ bool OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) override;
+
// Release memory and associated resources that have been purged.
void ReleaseFreeMemory();
« no previous file with comments | « no previous file | content/child/child_discardable_shared_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698