#include "components/segmentation_platform/internal/migration/prefs_migrator.h"
#include "components/segmentation_platform/internal/database/client_result_prefs.h"
#include "components/segmentation_platform/internal/metadata/metadata_utils.h"
#include "components/segmentation_platform/internal/migration/result_migration_utils.h"
#include "components/segmentation_platform/public/config.h"
#include "components/segmentation_platform/public/constants.h"
namespace segmentation_platform {
PrefsMigrator::PrefsMigrator(
PrefService* pref_service,
ClientResultPrefs* client_prefs,
const std::vector<std::unique_ptr<Config>>& configs)
: … { … }
PrefsMigrator::~PrefsMigrator() = default;
void PrefsMigrator::MigrateOldPrefsToNewPrefs() { … }
bool PrefsMigrator::IsPrefMigrationRequired(Config* config) { … }
void PrefsMigrator::UpdateNewPrefs(Config* config,
std::optional<SelectedSegment> old_result,
const proto::ClientResult* new_result) { … }
void PrefsMigrator::DeleteOldPrefsEntryIfFullyMigrated(
Config* config,
std::optional<SelectedSegment> old_result) { … }
}