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); |
}; |