chromium/components/history_clusters/core/file_clustering_backend.cc

// Copyright 2022 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/file_clustering_backend.h"

#include <optional>
#include <utility>

#include "base/command_line.h"
#include "base/containers/flat_map.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/thread_pool.h"
#include "components/history_clusters/core/filter_cluster_processor.h"
#include "components/history_clusters/core/history_clusters_util.h"

namespace history_clusters {

namespace switches {

const char kClustersOverrideFile[] =;

}  // namespace switches

namespace {

// Gets the file path that contains the clusters to use. Returns nullopt if the
// switch isn't on the command line or no file path is specified.
//
// Note that this does not validate that a valid path is specified, as that
// requires opening the file.
std::optional<base::FilePath> GetClustersOverrideFilePath() {}

// Reads the override file and builds the clusters from the file contents.
std::vector<history::Cluster> GetClustersFromFile() {}

std::vector<history::Cluster> GetClustersOnBackgroundThread(
    std::vector<history::AnnotatedVisit> visits) {}

}  // namespace

FileClusteringBackend::FileClusteringBackend()
    :{}
FileClusteringBackend::~FileClusteringBackend() = default;

// static
std::unique_ptr<FileClusteringBackend>
FileClusteringBackend::CreateIfEnabled() {}

void FileClusteringBackend::GetClusters(
    ClusteringRequestSource clustering_request_source,
    ClustersCallback callback,
    std::vector<history::AnnotatedVisit> visits,
    bool unused_requires_ui_and_triggerability) {}

void FileClusteringBackend::GetClustersForUI(
    ClusteringRequestSource clustering_request_source,
    QueryClustersFilterParams filter_params,
    ClustersCallback callback,
    std::vector<history::Cluster> clusters) {}

std::vector<history::Cluster>
FileClusteringBackend::GetClustersForUIOnBackgroundThread(
    ClusteringRequestSource clustering_request_source,
    QueryClustersFilterParams filter_params,
    std::vector<history::Cluster> persisted_clusters) {}

void FileClusteringBackend::GetClusterTriggerability(
    ClustersCallback callback,
    std::vector<history::Cluster> clusters) {}

}  // namespace history_clusters