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

Unified Diff: extensions/browser/value_store/leveldb_value_store.h

Issue 1310513004: [tracing] Add memory statistics from level db clients to tracing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@skia_res
Patch Set: Fix mac suballocation and make names unique. Created 5 years, 1 month 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 | extensions/browser/value_store/leveldb_value_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/value_store/leveldb_value_store.h
diff --git a/extensions/browser/value_store/leveldb_value_store.h b/extensions/browser/value_store/leveldb_value_store.h
index 29016605595accddfb3d90f111a8fb4f3d9f95ad..e763714280dcce9020ce561a89d90d7759919b29 100644
--- a/extensions/browser/value_store/leveldb_value_store.h
+++ b/extensions/browser/value_store/leveldb_value_store.h
@@ -11,6 +11,7 @@
#include "base/compiler_specific.h"
#include "base/files/file_path.h"
#include "base/memory/scoped_ptr.h"
+#include "base/trace_event/memory_dump_provider.h"
#include "extensions/browser/value_store/value_store.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
@@ -20,7 +21,8 @@ class HistogramBase;
// Value store area, backed by a leveldb database.
// All methods must be run on the FILE thread.
-class LeveldbValueStore : public ValueStore {
+class LeveldbValueStore : public ValueStore,
+ public base::trace_event::MemoryDumpProvider {
public:
// Creates a database bound to |path|. The underlying database won't be
// opened (i.e. may not be created) until one of the get/set/etc methods are
@@ -56,6 +58,10 @@ class LeveldbValueStore : public ValueStore {
// corruption in the database.
bool WriteToDbForTest(leveldb::WriteBatch* batch);
+ // base::trace_event::MemoryDumpProvider implementation.
+ bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
+ base::trace_event::ProcessMemoryDump* pmd) override;
+
private:
// Tries to open the database if it hasn't been opened already.
scoped_ptr<ValueStore::Error> EnsureDbIsOpen();
« no previous file with comments | « no previous file | extensions/browser/value_store/leveldb_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698