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

Unified Diff: content/browser/dom_storage/dom_storage_namespace.h

Issue 1906243002: [tracing] Add a memory dump provider for DOM storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. Created 4 years, 8 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: content/browser/dom_storage/dom_storage_namespace.h
diff --git a/content/browser/dom_storage/dom_storage_namespace.h b/content/browser/dom_storage/dom_storage_namespace.h
index 238b7ca554e75c65c94d646cf6963b71457049af..68fcd43b7c643ce3f6ca3b52dd5ae85533745f42 100644
--- a/content/browser/dom_storage/dom_storage_namespace.h
+++ b/content/browser/dom_storage/dom_storage_namespace.h
@@ -12,6 +12,7 @@
#include "base/files/file_path.h"
#include "base/memory/ref_counted.h"
+#include "base/trace_event/memory_dump_provider.h"
#include "content/common/content_export.h"
#include "url/gurl.h"
@@ -24,7 +25,8 @@ class SessionStorageDatabase;
// Container for the set of per-origin Areas.
// See class comments for DOMStorageContextImpl for a larger overview.
class CONTENT_EXPORT DOMStorageNamespace
- : public base::RefCountedThreadSafe<DOMStorageNamespace> {
+ : public base::RefCountedThreadSafe<DOMStorageNamespace>,
+ public base::trace_event::MemoryDumpProvider {
public:
// Option for PurgeMemory.
enum PurgeOption {
@@ -76,6 +78,10 @@ class CONTENT_EXPORT DOMStorageNamespace
unsigned int CountInMemoryAreas() const;
+ // base::trace_event::MemoryDumpProvider implementation.
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+ base::trace_event::ProcessMemoryDump* pmd) override;
+
private:
friend class base::RefCountedThreadSafe<DOMStorageNamespace>;
@@ -91,7 +97,7 @@ class CONTENT_EXPORT DOMStorageNamespace
};
typedef std::map<GURL, AreaHolder> AreaMap;
- ~DOMStorageNamespace();
+ ~DOMStorageNamespace() override;
// Returns a pointer to the area holder in our map or NULL.
AreaHolder* GetAreaHolder(const GURL& origin);

Powered by Google App Engine
This is Rietveld 408576698