chromium/components/sync/protocol/proto_memory_estimations.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Keep this file in sync with the .proto files in this directory.

#include "components/sync/protocol/proto_memory_estimations.h"

#include <concepts>
#include <string>

#include "base/trace_event/memory_usage_estimator.h"
#include "components/sync/protocol/data_type_progress_marker.pb.h"
#include "components/sync/protocol/data_type_state.pb.h"
#include "components/sync/protocol/entity_metadata.pb.h"
#include "components/sync/protocol/entity_specifics.pb.h"
#include "components/sync/protocol/nigori_specifics.pb.h"
#include "components/sync/protocol/persisted_entity_data.pb.h"
#include "components/sync/protocol/proto_visitors.h"
#include "components/sync/protocol/sync_entity.pb.h"
#include "components/sync/protocol/unique_position.pb.h"

namespace {

// This class is a VisitProtoFields()-compatible visitor that estimates
// proto's memory usage:
//
//  MemoryUsageVisitor visitor;
//  VisitProtoFields(visitor, proto);
//  size_t memory_usage = visitor.memory_usage();
//
class MemoryUsageVisitor {};

}  // namespace

sync_pb  // namespace sync_pb