cluster_processor.h 887 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef COMPONENTS_HISTORY_CLUSTERS_CORE_CLUSTER_PROCESSOR_H_
  5. #define COMPONENTS_HISTORY_CLUSTERS_CORE_CLUSTER_PROCESSOR_H_
  6. #include <vector>
  7. #include "components/history/core/browser/history_types.h"
  8. namespace history_clusters {
  9. // An abstract interface for cluster processors that perform operations on
  10. // clusters.
  11. class ClusterProcessor {
  12. public:
  13. virtual ~ClusterProcessor() = default;
  14. // Performs operations on clusters (i.e. combine, split).
  15. virtual std::vector<history::Cluster> ProcessClusters(
  16. const std::vector<history::Cluster>& clusters) = 0;
  17. protected:
  18. ClusterProcessor() = default;
  19. };
  20. } // namespace history_clusters
  21. #endif // COMPONENTS_HISTORY_CLUSTERS_CORE_CLUSTER_PROCESSOR_H_