chromium/components/history_clusters/core/history_clusters_service_task_get_most_recent_clusters.h

// 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.

#ifndef COMPONENTS_HISTORY_CLUSTERS_CORE_HISTORY_CLUSTERS_SERVICE_TASK_GET_MOST_RECENT_CLUSTERS_H_
#define COMPONENTS_HISTORY_CLUSTERS_CORE_HISTORY_CLUSTERS_SERVICE_TASK_GET_MOST_RECENT_CLUSTERS_H_

#include <vector>

#include "base/memory/weak_ptr.h"
#include "base/task/cancelable_task_tracker.h"
#include "base/time/time.h"
#include "components/history/core/browser/history_types.h"
#include "components/history_clusters/core/clustering_backend.h"
#include "components/history_clusters/core/history_clusters_service_task.h"
#include "components/history_clusters/core/history_clusters_types.h"

namespace history {
class HistoryService;
}  // namespace history

namespace history_clusters {

class HistoryClustersService;

// `HistoryClustersServiceTaskGetMostRecentClusters` 1st gets newly generated
// clusters from the clustering backend using unclustered visits from the
// history backend. Then, once the unclustered visits are exhausted, it switches
// to getting persisted clusters from the history backend.
// It is an extension of `HistoryClustersService`; rather than pollute the
// latter's namespace with a bunch of callbacks, this class groups those
// callbacks.
class HistoryClustersServiceTaskGetMostRecentClusters
    : public HistoryClustersServiceTask {};

}  // namespace history_clusters

#endif  // COMPONENTS_HISTORY_CLUSTERS_CORE_HISTORY_CLUSTERS_SERVICE_TASK_GET_MOST_RECENT_CLUSTERS_H_