Add settings reset defaults
This commit is contained in:
@@ -90,6 +90,10 @@ impl BrowserCore {
|
||||
self.set_profile_download_policy(&profile_id, download_policy)
|
||||
}
|
||||
|
||||
pub fn reset_active_profile_download_settings(&mut self) -> Result<(), CoreError> {
|
||||
self.set_active_profile_download_policy(DownloadPolicy::ask_every_time())
|
||||
}
|
||||
|
||||
pub fn set_profile_sync_policy(
|
||||
&mut self,
|
||||
profile_id: &ProfileId,
|
||||
@@ -108,6 +112,12 @@ impl BrowserCore {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn reset_profile_sync_settings(&mut self) {
|
||||
for profile in &mut self.profiles {
|
||||
profile.set_sync_policy(ProfileSyncPolicy::default());
|
||||
}
|
||||
}
|
||||
|
||||
pub(super) fn cleanup_private_profile_session_data(&mut self, profile_id: &ProfileId) {
|
||||
if self
|
||||
.profiles
|
||||
|
||||
@@ -66,6 +66,10 @@ impl BrowserCore {
|
||||
self.sync_object_policies.set(kind, policy);
|
||||
}
|
||||
|
||||
pub fn reset_sync_settings(&mut self) {
|
||||
self.sync_object_policies = SyncObjectPolicies::default();
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn sync_object_policy(&self, kind: SyncObjectKind) -> SyncObjectPolicy {
|
||||
self.sync_object_policies.get(kind)
|
||||
|
||||
Reference in New Issue
Block a user