#include "components/sync/engine/loopback_server/loopback_server_entity.h"
#include <limits>
#include <string_view>
#include <vector>
#include "base/memory/ref_counted.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "components/sync/engine/loopback_server/persistent_bookmark_entity.h"
#include "components/sync/engine/loopback_server/persistent_permanent_entity.h"
#include "components/sync/engine/loopback_server/persistent_tombstone_entity.h"
#include "components/sync/engine/loopback_server/persistent_unique_client_entity.h"
#include "components/sync/protocol/loopback_server.pb.h"
#include "components/sync/protocol/sync_entity.pb.h"
#include "net/base/net_errors.h"
#include "net/http/http_status_code.h"
string;
vector;
DataType;
namespace {
const char kIdSeparator[] = …;
}
namespace syncer {
LoopbackServerEntity::~LoopbackServerEntity() = default;
std::unique_ptr<LoopbackServerEntity>
LoopbackServerEntity::CreateEntityFromProto(
const sync_pb::LoopbackServerEntity& entity) { … }
const std::string& LoopbackServerEntity::GetId() const { … }
DataType LoopbackServerEntity::GetDataType() const { … }
int64_t LoopbackServerEntity::GetVersion() const { … }
void LoopbackServerEntity::SetVersion(int64_t version) { … }
const std::string& LoopbackServerEntity::GetName() const { … }
void LoopbackServerEntity::SetName(const std::string& name) { … }
void LoopbackServerEntity::SetSpecifics(
const sync_pb::EntitySpecifics& updated_specifics) { … }
sync_pb::EntitySpecifics LoopbackServerEntity::GetSpecifics() const { … }
bool LoopbackServerEntity::IsDeleted() const { … }
bool LoopbackServerEntity::IsFolder() const { … }
bool LoopbackServerEntity::IsPermanent() const { … }
sync_pb::LoopbackServerEntity_Type
LoopbackServerEntity::GetLoopbackServerEntityType() const { … }
string LoopbackServerEntity::CreateId(const DataType& data_type,
const string& inner_id) { … }
std::string LoopbackServerEntity::GetTopLevelId(const DataType& data_type) { … }
DataType LoopbackServerEntity::GetDataTypeFromId(const string& id) { … }
std::string LoopbackServerEntity::GetInnerIdFromId(const std::string& id) { … }
LoopbackServerEntity::LoopbackServerEntity(const string& id,
const DataType& data_type,
int64_t version,
const string& name)
: … { … }
void LoopbackServerEntity::SerializeBaseProtoFields(
sync_pb::SyncEntity* sync_entity) const { … }
void LoopbackServerEntity::SerializeAsLoopbackServerEntity(
sync_pb::LoopbackServerEntity* entity) const { … }
}