chromium/components/sync_bookmarks/local_bookmark_model_merger.cc


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

#include "components/sync_bookmarks/local_bookmark_model_merger.h"

#include <list>
#include <optional>
#include <string>
#include <utility>

#include "base/hash/hash.h"
#include "base/strings/utf_string_conversions.h"
#include "base/uuid.h"
#include "components/bookmarks/browser/bookmark_node.h"
#include "components/sync_bookmarks/bookmark_model_view.h"
#include "components/sync_bookmarks/bookmark_specifics_conversions.h"
#include "ui/base/models/tree_node_iterator.h"
#include "url/gurl.h"

namespace sync_bookmarks {

namespace {

// Struct representing a subset of fields of BookmarkNode, such that two nodes
// with the same parent are considered a semantic match if the
// SiblingSemanticMatchKey value computed for them are equal.
struct SiblingSemanticMatchKey {};

struct SiblingSemanticMatchKeyHash {};

struct SiblingSemanticMatchKeyEquals {};

SiblingSemanticMatchKey GetSiblingSemanticMatchKeyForNode(
    const bookmarks::BookmarkNode* node) {}

bool NodesCompatibleForMatchByUuid(const bookmarks::BookmarkNode* node1,
                                   const bookmarks::BookmarkNode* node2) {}

}  // namespace

LocalBookmarkModelMerger::LocalBookmarkModelMerger(
    const BookmarkModelView* local_model,
    BookmarkModelView* account_model)
    :{}

LocalBookmarkModelMerger::~LocalBookmarkModelMerger() = default;

void LocalBookmarkModelMerger::Merge() {}

// static
std::unordered_map<base::Uuid,
                   LocalBookmarkModelMerger::GuidMatch,
                   base::UuidHash>
LocalBookmarkModelMerger::FindGuidMatches(
    const BookmarkModelView* local_model,
    const BookmarkModelView* account_model) {}

void LocalBookmarkModelMerger::MergeSubtree(
    const bookmarks::BookmarkNode* local_subtree_root,
    const bookmarks::BookmarkNode* account_subtree_root) {}

void LocalBookmarkModelMerger::UpdateAccountNodeFromMatchingLocalNode(
    const bookmarks::BookmarkNode* local_node,
    const bookmarks::BookmarkNode* account_node) {}

const bookmarks::BookmarkNode*
LocalBookmarkModelMerger::CopyLocalNodeToAccountModel(
    const bookmarks::BookmarkNode* local_node,
    const bookmarks::BookmarkNode* account_parent) {}

const bookmarks::BookmarkNode*
LocalBookmarkModelMerger::FindMatchingLocalNodeByUuid(
    const bookmarks::BookmarkNode* account_node) const {}

const bookmarks::BookmarkNode*
LocalBookmarkModelMerger::FindMatchingAccountNodeByUuid(
    const bookmarks::BookmarkNode* local_node) const {}

}  // namespace sync_bookmarks