#include "components/sync/engine/bookmark_update_preprocessing.h"
#include <array>
#include "base/base64.h"
#include "base/containers/span.h"
#include "base/hash/sha1.h"
#include "base/logging.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/uuid.h"
#include "components/sync/base/data_type.h"
#include "components/sync/base/hash_util.h"
#include "components/sync/base/unique_position.h"
#include "components/sync/protocol/bookmark_specifics.pb.h"
#include "components/sync/protocol/entity_specifics.pb.h"
#include "components/sync/protocol/sync_entity.pb.h"
namespace syncer {
namespace {
enum class BookmarkGuidSource { … };
inline void LogGuidSource(BookmarkGuidSource source) { … }
std::string ComputeUuidFromBytes(base::span<const uint8_t> bytes) { … }
std::string InferGuidForLegacyBookmark(
const std::string& originator_cache_guid,
const std::string& originator_client_item_id) { … }
std::string GenerateUniquePositionSuffixForBookmark(
const std::string& originator_cache_guid,
const std::string& originator_client_item_id) { … }
sync_pb::UniquePosition GetUniquePositionFromSyncEntity(
const sync_pb::SyncEntity& update_entity) { … }
}
bool AdaptUniquePositionForBookmark(const sync_pb::SyncEntity& update_entity,
sync_pb::EntitySpecifics* specifics) { … }
void AdaptTypeForBookmark(const sync_pb::SyncEntity& update_entity,
sync_pb::EntitySpecifics* specifics) { … }
void AdaptTitleForBookmark(const sync_pb::SyncEntity& update_entity,
sync_pb::EntitySpecifics* specifics,
bool specifics_were_encrypted) { … }
void AdaptGuidForBookmark(const sync_pb::SyncEntity& update_entity,
sync_pb::EntitySpecifics* specifics) { … }
std::string InferGuidForLegacyBookmarkForTesting(
const std::string& originator_cache_guid,
const std::string& originator_client_item_id) { … }
}