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

Unified Diff: content/browser/indexed_db/indexed_db_backing_store.cc

Issue 1420193003: [tracing] Add IndexDB database memory usages to tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@leveldb
Patch Set: build fix. Created 4 years, 10 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/indexed_db/indexed_db_backing_store.cc
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index dc4f3364fcb9368409d3d50db3c22bb232c33375..a3795d95a6d6670f58c59038f02a90705c699914 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -18,6 +18,7 @@
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/trace_event/memory_dump_manager.h"
#include "build/build_config.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/indexed_db/indexed_db_blob_info.h"
@@ -1105,6 +1106,11 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBBackingStore::Open(
origin_url);
}
+ base::trace_event::MemoryDumpManager::GetInstance()
+ ->RegisterDumpProviderWithSequencedTaskRunner(
+ db.get(), "IndexedDBBackingStore", task_runner,
+ base::trace_event::MemoryDumpProvider::Options());
+
scoped_refptr<IndexedDBBackingStore> backing_store =
Create(indexed_db_factory, origin_url, blob_path, request_context,
std::move(db), std::move(comparator), task_runner, status);
@@ -1149,6 +1155,10 @@ scoped_refptr<IndexedDBBackingStore> IndexedDBBackingStore::OpenInMemory(
return scoped_refptr<IndexedDBBackingStore>();
}
HistogramOpenStatus(INDEXED_DB_BACKING_STORE_OPEN_MEMORY_SUCCESS, origin_url);
+ base::trace_event::MemoryDumpManager::GetInstance()
+ ->RegisterDumpProviderWithSequencedTaskRunner(
+ db.get(), "IndexedDBBackingStore", task_runner,
+ base::trace_event::MemoryDumpProvider::Options());
return Create(NULL /* indexed_db_factory */, origin_url, base::FilePath(),
NULL /* request_context */, std::move(db),

Powered by Google App Engine
This is Rietveld 408576698