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

Unified Diff: content/browser/dom_storage/dom_storage_area.cc

Issue 2548063002: [tracing] Show the local storage databases under dom_storage (Closed)
Patch Set: Add IsOpen. Created 4 years 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/browser/dom_storage/dom_storage_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_area.cc
diff --git a/content/browser/dom_storage/dom_storage_area.cc b/content/browser/dom_storage/dom_storage_area.cc
index 884082f15dee8a41260b244a4a3fff96a8668793..69c90596b0767a9b23baa5a6ff0930830c202257 100644
--- a/content/browser/dom_storage/dom_storage_area.cc
+++ b/content/browser/dom_storage/dom_storage_area.cc
@@ -374,6 +374,11 @@ void DOMStorageArea::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) {
pmd->AddSuballocation(commit_batch_mad->guid(), system_allocator_name);
}
+ // Report memory usage for local storage backing. The session storage usage
+ // will be reported by DOMStorageContextImpl.
+ if (namespace_id_ == kLocalStorageNamespaceId && backing_)
+ backing_->ReportMemoryUsage(pmd, name + "/local_storage");
+
// Do not add storage map usage if less than 1KB.
if (map_->bytes_used() < 1024)
return;
@@ -384,7 +389,6 @@ void DOMStorageArea::OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd) {
map_->bytes_used());
if (system_allocator_name)
pmd->AddSuballocation(map_mad->guid(), system_allocator_name);
- // TODO(ssid): Add memory usage of local backing storage crbug.com/605785.
}
void DOMStorageArea::InitialImportIfNeeded() {
« no previous file with comments | « no previous file | content/browser/dom_storage/dom_storage_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698