#ifndef COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_SPECIFICS_CONVERSIONS_H_
#define COMPONENTS_SYNC_BOOKMARKS_BOOKMARK_SPECIFICS_CONVERSIONS_H_
#include <stddef.h>
#include <string>
#include "base/uuid.h"
#include "components/sync/protocol/bookmark_specifics.pb.h"
namespace bookmarks {
class BookmarkNode;
}
namespace sync_pb {
class EntitySpecifics;
class UniquePosition;
}
namespace syncer {
class ClientTagHash;
struct EntityData;
}
namespace favicon {
class FaviconService;
}
namespace sync_bookmarks {
class BookmarkModelView;
std::string FullTitleToLegacyCanonicalizedTitle(const std::string& node_title);
bool IsBookmarkEntityReuploadNeeded(
const syncer::EntityData& remote_entity_data);
sync_pb::EntitySpecifics CreateSpecificsFromBookmarkNode(
const bookmarks::BookmarkNode* node,
BookmarkModelView* model,
const sync_pb::UniquePosition& unique_position,
bool force_favicon_load);
const bookmarks::BookmarkNode* CreateBookmarkNodeFromSpecifics(
const sync_pb::BookmarkSpecifics& specifics,
const bookmarks::BookmarkNode* parent,
size_t index,
BookmarkModelView* model,
favicon::FaviconService* favicon_service);
void UpdateBookmarkNodeFromSpecifics(
const sync_pb::BookmarkSpecifics& specifics,
const bookmarks::BookmarkNode* node,
BookmarkModelView* model,
favicon::FaviconService* favicon_service);
sync_pb::BookmarkSpecifics::Type GetProtoTypeFromBookmarkNode(
const bookmarks::BookmarkNode* node);
const bookmarks::BookmarkNode* ReplaceBookmarkNodeUuid(
const bookmarks::BookmarkNode* node,
const base::Uuid& guid,
BookmarkModelView* model);
bool IsValidBookmarkSpecifics(const sync_pb::BookmarkSpecifics& specifics);
base::Uuid InferGuidFromLegacyOriginatorId(
const std::string& originator_cache_guid,
const std::string& originator_client_item_id);
bool HasExpectedBookmarkGuid(const sync_pb::BookmarkSpecifics& specifics,
const syncer::ClientTagHash& client_tag_hash,
const std::string& originator_cache_guid,
const std::string& originator_client_item_id);
}
#endif