Index: components/sync/syncable/entry_kernel.h |
diff --git a/components/sync/syncable/entry_kernel.h b/components/sync/syncable/entry_kernel.h |
index 82a58988864e4be3788ef8c9e71a3a41fd65686a..2604e16ec56eb25699e91541594d73dd1692dfd0 100644 |
--- a/components/sync/syncable/entry_kernel.h |
+++ b/components/sync/syncable/entry_kernel.h |
@@ -225,6 +225,7 @@ struct EntryKernel { |
dirty_index->insert(ref(META_HANDLE)); |
} |
dirty_ = true; |
+ memory_usage_ = kMemoryUsageUnknown; |
} |
// Clear the dirty bit, and optionally remove this entry's metahandle from |
@@ -377,9 +378,13 @@ struct EntryKernel { |
// they will be serialized as empty proto's. |
base::DictionaryValue* ToValue(Cryptographer* cryptographer) const; |
+ size_t EstimateMemoryUsage() const; |
+ |
private: |
// Tracks whether this entry needs to be saved to the database. |
bool dirty_; |
+ mutable size_t memory_usage_; |
+ constexpr static size_t kMemoryUsageUnknown = -1; |
}; |
template <typename T> |