#include "chrome/browser/extensions/api/bookmarks/bookmark_api_helpers.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/values.h"
#include "chrome/browser/extensions/bookmarks/bookmarks_error_constants.h"
#include "chrome/common/extensions/api/bookmarks.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_utils.h"
#include "components/bookmarks/common/bookmark_metrics.h"
#include "components/bookmarks/managed/managed_bookmark_service.h"
BookmarkModel;
BookmarkNode;
namespace extensions {
BookmarkTreeNode;
namespace bookmark_api_helpers {
namespace {
void AddNodeHelper(bookmarks::ManagedBookmarkService* managed,
const BookmarkNode* node,
std::vector<BookmarkTreeNode>* nodes,
bool recurse,
bool only_folders) { … }
}
BookmarkTreeNode GetBookmarkTreeNode(bookmarks::ManagedBookmarkService* managed,
const BookmarkNode* node,
bool recurse,
bool only_folders) { … }
void PopulateBookmarkTreeNode(
bookmarks::ManagedBookmarkService* managed,
const bookmarks::BookmarkNode* node,
bool recurse,
bool only_folders,
api::bookmarks::BookmarkTreeNode* out_bookmark_tree_node) { … }
void AddNode(bookmarks::ManagedBookmarkService* managed,
const BookmarkNode* node,
std::vector<BookmarkTreeNode>* nodes,
bool recurse) { … }
void AddNodeFoldersOnly(bookmarks::ManagedBookmarkService* managed,
const BookmarkNode* node,
std::vector<BookmarkTreeNode>* nodes,
bool recurse) { … }
bool RemoveNode(BookmarkModel* model,
bookmarks::ManagedBookmarkService* managed,
int64_t id,
bool recursive,
std::string* error) { … }
void GetMetaInfo(const BookmarkNode& node,
base::Value::Dict& id_to_meta_info_map) { … }
}
}