chromium/components/history_clusters/core/history_cluster_type_utils.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/history_clusters/core/history_cluster_type_utils.h"

#include <optional>

#include "base/i18n/time_formatting.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
#include "components/history/core/browser/history_types.h"
#include "components/history_clusters/core/config.h"
#include "components/history_clusters/public/mojom/history_cluster_types.mojom.h"
#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_service.h"
#include "ui/base/l10n/time_format.h"

namespace history_clusters {

// Creates a `mojom::VisitPtr` from a `history_clusters::Visit`.
mojom::URLVisitPtr VisitToMojom(const TemplateURLService* template_url_service,
                                const history::ClusterVisit& visit) {}

// Creates a `mojom::SearchQueryPtr` from the given search query, if possible.
std::optional<mojom::SearchQueryPtr> SearchQueryToMojom(
    const TemplateURLService* template_url_service,
    const std::string& search_query) {}

mojom::ClusterPtr ClusterToMojom(const TemplateURLService* template_url_service,
                                 const history::Cluster cluster) {}

}  // namespace history_clusters