Index: components/sync/base/proto_value_ptr.h |
diff --git a/components/sync/base/proto_value_ptr.h b/components/sync/base/proto_value_ptr.h |
index 35c86b346aa199fd1e8eeb4695c56700f90fa05d..c804216af7a4c77dc3a3460e4d4599d27766ec22 100644 |
--- a/components/sync/base/proto_value_ptr.h |
+++ b/components/sync/base/proto_value_ptr.h |
@@ -125,6 +125,13 @@ class ProtoValuePtr { |
scoped_refptr<Wrapper> wrapper_; |
}; |
+template <typename T, typename Traits> |
+size_t EstimateMemoryUsage(const ProtoValuePtr<T, Traits>& ptr) { |
+ return &ptr.value() != &Traits::DefaultValue() ? |
+ EstimateMemoryUsage(ptr.value()) : |
+ 0; |
+} |
+ |
} // namespace syncer |
#endif // COMPONENTS_SYNC_BASE_PROTO_VALUE_PTR_H_ |