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

Unified Diff: content/browser/dom_storage/dom_storage_context_impl.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: Fix dcheck and return value. Created 4 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
Index: content/browser/dom_storage/dom_storage_context_impl.h
diff --git a/content/browser/dom_storage/dom_storage_context_impl.h b/content/browser/dom_storage/dom_storage_context_impl.h
index e38e4387c13a8d82ccdd13df5f61d38b468e6ad8..c2bbe4d42b50fcd2991e976540e64a6e1b58acc0 100644
--- a/content/browser/dom_storage/dom_storage_context_impl.h
+++ b/content/browser/dom_storage/dom_storage_context_impl.h
@@ -18,6 +18,7 @@
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
#include "base/time/time.h"
+#include "base/trace_event/memory_dump_provider.h"
#include "content/common/content_export.h"
#include "url/gurl.h"
@@ -61,7 +62,8 @@ struct SessionStorageUsageInfo;
// DOMStorageHost, and DOMStorageSession. The other classes are for
// internal consumption.
class CONTENT_EXPORT DOMStorageContextImpl
- : public base::RefCountedThreadSafe<DOMStorageContextImpl> {
+ : public base::RefCountedThreadSafe<DOMStorageContextImpl>,
+ public base::trace_event::MemoryDumpProvider {
public:
// An interface for observing Local and Session Storage events on the
// background thread.
@@ -173,6 +175,10 @@ class CONTENT_EXPORT DOMStorageContextImpl
// unclean exit.
void StartScavengingUnusedSessionStorage();
+ // base::trace_event::MemoryDumpProvider implementation.
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+ base::trace_event::ProcessMemoryDump* pmd) override;
+
private:
friend class DOMStorageContextImplTest;
FRIEND_TEST_ALL_PREFIXES(DOMStorageContextImplTest, Basics);
@@ -180,7 +186,7 @@ class CONTENT_EXPORT DOMStorageContextImpl
typedef std::map<int64_t, scoped_refptr<DOMStorageNamespace>>
StorageNamespaceMap;
- ~DOMStorageContextImpl();
+ ~DOMStorageContextImpl() override;
void ClearSessionOnlyOrigins();
« no previous file with comments | « content/browser/dom_storage/dom_storage_area.cc ('k') | content/browser/dom_storage/dom_storage_context_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698