#include "components/segmentation_platform/internal/selection/segmentation_result_prefs.h"
#include "base/json/values_util.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/segmentation_platform/internal/constants.h"
namespace segmentation_platform {
SelectedSegment::SelectedSegment(SegmentId segment_id,
std::optional<float> rank)
: … { … }
SelectedSegment::~SelectedSegment() = default;
SegmentationResultPrefs::SegmentationResultPrefs(PrefService* pref_service)
: … { … }
void SegmentationResultPrefs::SaveSegmentationResultToPref(
const std::string& result_key,
const std::optional<SelectedSegment>& selected_segment) { … }
std::optional<SelectedSegment>
SegmentationResultPrefs::ReadSegmentationResultFromPref(
const std::string& result_key) { … }
}