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

Unified Diff: components/sync/syncable/parent_child_index.cc

Issue 2452713003: [Sync] Implement MemoryDumpProvider. (Closed)
Patch Set: Fix presumit; fix Windows; git cl format Created 4 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 | « components/sync/syncable/parent_child_index.h ('k') | components/sync/syncable/syncable_id.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/syncable/parent_child_index.cc
diff --git a/components/sync/syncable/parent_child_index.cc b/components/sync/syncable/parent_child_index.cc
index c0db190fe76f8ea4b012ad28232ac01ea6f8035a..386a92d92140f4612df5cd6d9abcf5e9c249302f 100644
--- a/components/sync/syncable/parent_child_index.cc
+++ b/components/sync/syncable/parent_child_index.cc
@@ -167,6 +167,13 @@ const OrderedChildSet* ParentChildIndex::GetSiblings(EntryKernel* e) const {
return siblings.get();
}
+size_t ParentChildIndex::EstimateMemoryUsage() const {
+ using base::trace_event::EstimateMemoryUsage;
+ return EstimateMemoryUsage(parent_children_map_) +
+ EstimateMemoryUsage(model_type_root_ids_) +
+ EstimateMemoryUsage(type_root_child_sets_);
+}
+
/* static */
bool ParentChildIndex::ShouldUseParentId(const Id& parent_id,
ModelType model_type) {
« no previous file with comments | « components/sync/syncable/parent_child_index.h ('k') | components/sync/syncable/syncable_id.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698