chromium/components/segmentation_platform/internal/database/signal_storage_config.cc

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

#include "components/segmentation_platform/internal/database/signal_storage_config.h"

#include "base/containers/contains.h"
#include "base/functional/callback_helpers.h"
#include "components/segmentation_platform/internal/metadata/metadata_utils.h"
#include "components/segmentation_platform/public/proto/model_metadata.pb.h"

namespace segmentation_platform {
namespace {
// The key of the one and only entry in the database.
const char kDatabaseKey[] =;
}  // namespace

CleanupItem::CleanupItem() = default;
CleanupItem::CleanupItem(uint64_t name_hash,
                         uint64_t event_hash,
                         proto::SignalType signal_type,
                         base::Time timestamp)
    :{}

CleanupItem::~CleanupItem() = default;

bool CleanupItem::operator==(const CleanupItem& other) const {}

SignalStorageConfig::SignalStorageConfig(
    std::unique_ptr<SignalStorageConfigProtoDb> database,
    base::Clock* clock)
    :{}

SignalStorageConfig::~SignalStorageConfig() = default;

void SignalStorageConfig::InitAndLoad(SuccessCallback callback) {}

void SignalStorageConfig::OnDatabaseInitialized(
    SuccessCallback callback,
    leveldb_proto::Enums::InitStatus status) {}

void SignalStorageConfig::OnDataLoaded(
    SuccessCallback callback,
    bool success,
    std::unique_ptr<std::vector<proto::SignalStorageConfigs>> entries) {}

proto::SignalStorageConfig* SignalStorageConfig::FindSignal(
    uint64_t signal_hash,
    uint64_t event_hash,
    proto::SignalType signal_type) {}

void SignalStorageConfig::UpdateConfigForUMASignal(
    int signal_storage_length,
    bool* is_dirty,
    const proto::UMAFeature& feature) {}

bool SignalStorageConfig::UpdateConfigForSignal(int signal_storage_length,
                                                uint64_t signal_hash,
                                                uint64_t event_hash,
                                                proto::SignalType signal_type) {}

bool SignalStorageConfig::MeetsSignalCollectionRequirementForSignal(
    base::TimeDelta min_signal_collection_length,
    uint64_t signal_hash,
    uint64_t event_hash,
    proto::SignalType signal_type) {}

bool SignalStorageConfig::MeetsSignalCollectionRequirement(
    const proto::SegmentationModelMetadata& model_metadata,
    bool include_outputs) {}

void SignalStorageConfig::OnSignalCollectionStarted(
    const proto::SegmentationModelMetadata& model_metadata) {}

void SignalStorageConfig::GetSignalsForCleanup(
    const std::set<std::pair<uint64_t, proto::SignalType>>& known_signals,
    std::vector<CleanupItem>& result) const {}

void SignalStorageConfig::UpdateSignalsForCleanup(
    const std::vector<CleanupItem>& signals) {}

void SignalStorageConfig::WriteToDB() {}

}  // namespace segmentation_platform