// Copyright 2021 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_SEGMENTATION_PLATFORM_INTERNAL_DATABASE_SIGNAL_STORAGE_CONFIG_H_ #define COMPONENTS_SEGMENTATION_PLATFORM_INTERNAL_DATABASE_SIGNAL_STORAGE_CONFIG_H_ #include <memory> #include <set> #include <utility> #include <vector> #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/time/clock.h" #include "components/leveldb_proto/public/proto_database.h" #include "components/segmentation_platform/internal/database/signal_key.h" #include "components/segmentation_platform/internal/proto/signal_storage_config.pb.h" #include "components/segmentation_platform/public/proto/model_metadata.pb.h" namespace segmentation_platform { // CleanupItem is used to store signals for cleanup. struct CleanupItem { … }; // SignalStorageConfig is used to determine whether the signals for a model have // been captured long enough to be used for model evaluation. It is also used // for cleaning up the old entries for a signal in the signal database. It's // able to answer these two questions based on storing (1) The timestamp of the // first time we encountered the signal. (2) The longest storage requirement to // store the signal across models. The DB is read to memory on startup, so that // subsequent queries can be answered synchronously. class SignalStorageConfig { … }; } // namespace segmentation_platform #endif // COMPONENTS_SEGMENTATION_PLATFORM_INTERNAL_DATABASE_SIGNAL_STORAGE_CONFIG_H_