Add privacy history settings

This commit is contained in:
2026-05-08 03:19:43 -04:00
parent 4bdbf5e0c5
commit 6ba7fd611c
11 changed files with 364 additions and 7 deletions
+39
View File
@@ -0,0 +1,39 @@
#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)]
pub enum HistoryRecordingPolicy {
#[default]
Record,
Pause,
}
impl HistoryRecordingPolicy {
pub const ALL: &[Self] = &[Self::Record, Self::Pause];
#[must_use]
pub fn records_history(self) -> bool {
matches!(self, Self::Record)
}
#[must_use]
pub fn name(self) -> &'static str {
match self {
Self::Record => "Record History",
Self::Pause => "Pause History",
}
}
#[must_use]
pub fn detail(self) -> &'static str {
match self {
Self::Record => "Save new web visits for Standard Profiles.",
Self::Pause => "Skip new history entries for Standard Profiles.",
}
}
#[must_use]
pub fn status(self) -> &'static str {
match self {
Self::Record => "History recording is on",
Self::Pause => "History recording is paused",
}
}
}