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
+2
View File
@@ -7,6 +7,7 @@ mod history;
mod identifiers;
mod new_tab;
mod plugin;
mod privacy;
mod profile;
mod reading_list;
mod search;
@@ -34,6 +35,7 @@ pub use plugin::{
PluginContributionPoint, PluginId, PluginManifest, PluginPermission, PluginPermissionRisk,
PluginSignature, PluginSignatureAlgorithm,
};
pub use privacy::HistoryRecordingPolicy;
pub use profile::{Profile, ProfileKind};
pub use reading_list::{ReadingListEntry, ReadingProgress};
pub use search::SearchEngine;
+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",
}
}
}