// 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_SELECTION_SEGMENTATION_RESULT_PREFS_H_ #define COMPONENTS_SEGMENTATION_PLATFORM_INTERNAL_SELECTION_SEGMENTATION_RESULT_PREFS_H_ #include <optional> #include "base/memory/raw_ptr.h" #include "base/time/time.h" #include "components/segmentation_platform/public/proto/segmentation_platform.pb.h" class PrefService; namespace segmentation_platform { SegmentId; // Struct containing information about the selected segment. Convenient for // reading and writing to prefs. struct SelectedSegment { … }; // Stores the result of segmentation into prefs for faster lookup. The result // consists of (1) The selected segment ID. (2) The time when the segment was // first selected. Used to enforce segment selection TTL. (3) Whether the // selected segment has started to be used by clients. class SegmentationResultPrefs { … }; } // namespace segmentation_platform #endif // COMPONENTS_SEGMENTATION_PLATFORM_INTERNAL_SELECTION_SEGMENTATION_RESULT_PREFS_H_