| 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 0f97323ea9927bebe93153a452cc8392ae89d0e6..a10f19f21aa3cc1921ffe45f9c59a83dfe0a8cc3 100644
|
| --- a/components/sync/base/proto_value_ptr.h
|
| +++ b/components/sync/base/proto_value_ptr.h
|
| @@ -89,6 +89,10 @@ class ProtoValuePtr {
|
| return &wrapped_instance;
|
| }
|
|
|
| + explicit operator bool () const { return wrapper_ != nullptr; }
|
| + bool operator == (decltype(nullptr)) const { return wrapper_ == nullptr; }
|
| + bool operator != (decltype(nullptr)) const { return wrapper_ != nullptr; }
|
| +
|
| private:
|
| friend struct syncable::EntryKernel;
|
| friend struct syncer_v2::EntityData;
|
| @@ -127,6 +131,11 @@ class ProtoValuePtr {
|
| scoped_refptr<Wrapper> wrapper_;
|
| };
|
|
|
| +template <typename T, typename Traits>
|
| +size_t EstimateMemoryUsage(const ProtoValuePtr<T, Traits>& ptr) {
|
| + return ptr? EstimateMemoryUsage(ptr.value()) : 0;
|
| +}
|
| +
|
| } // namespace syncer
|
|
|
| #endif // COMPONENTS_SYNC_BASE_PROTO_VALUE_PTR_H_
|
|
|