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

Unified Diff: sync/syncable/parent_child_index.h

Issue 2084243004: [WIP][tracing] Add memory dump provider for sync Directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add visitors for memory. Created 4 years, 6 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: sync/syncable/parent_child_index.h
diff --git a/sync/syncable/parent_child_index.h b/sync/syncable/parent_child_index.h
index 540234c62b29e81b16557739a626dad8a7a06e14..fad40fdde59fba6d4655cd553013c65f24f9de8a 100644
--- a/sync/syncable/parent_child_index.h
+++ b/sync/syncable/parent_child_index.h
@@ -60,6 +60,9 @@ class SYNC_EXPORT ParentChildIndex {
// Returns all siblings of the entry.
const OrderedChildSet* GetSiblings(EntryKernel* e) const;
+ // Returns the memory usage of the index.
+ size_t bytes_used() const { return bytes_used_; }
+
private:
friend class ParentChildIndexTest;
@@ -95,6 +98,9 @@ class SYNC_EXPORT ParentChildIndex {
// with implicit parent.
TypeRootChildSets type_root_child_sets_;
+ // Stores the current memory usage of the objects.
+ size_t bytes_used_;
+
DISALLOW_COPY_AND_ASSIGN(ParentChildIndex);
};

Powered by Google App Engine
This is Rietveld 408576698