diff --git a/CHANGELOG.md b/CHANGELOG.md index 315e730130..51f5ed8ecd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ ## ⚠️ Breaking Changes ⚠️ +### Logins + +- **BREAKING**: Removed deprecated checkpoint API: `set_checkpoint(checkpoint)` and `get_checkpoint()` + ### Remote-Settings * Removed legacy remote-settings client * Renaming `RemoteSettingsConfig2` to `RemoteSettingsConfig`, which will require client updates. diff --git a/components/logins/src/logins.udl b/components/logins/src/logins.udl index cca405ffed..cac036b66a 100644 --- a/components/logins/src/logins.udl +++ b/components/logins/src/logins.udl @@ -291,12 +291,6 @@ interface LoginStore { [Throws=LoginsApiError] Login? get([ByRef] string id); - [Throws=LoginsApiError] - void set_checkpoint([ByRef] string checkpoint); - - [Throws=LoginsApiError] - string? get_checkpoint(); - /// Run maintenance on the DB /// /// This is intended to be run during idle time and will take steps / to clean up / shrink the diff --git a/components/logins/src/schema.rs b/components/logins/src/schema.rs index 3fff292a5d..1a93b19b93 100644 --- a/components/logins/src/schema.rs +++ b/components/logins/src/schema.rs @@ -211,7 +211,6 @@ const CREATE_LOCAL_BREACHES_TABLE_SQL: &str = " pub(crate) static LAST_SYNC_META_KEY: &str = "last_sync_time"; pub(crate) static GLOBAL_SYNCID_META_KEY: &str = "global_sync_id"; pub(crate) static COLLECTION_SYNCID_META_KEY: &str = "passwords_sync_id"; -pub(crate) static CHECKPOINT_KEY: &str = "checkpoint"; pub(crate) fn init(db: &Connection) -> Result<()> { let user_version = db.conn_ext_query_one::("PRAGMA user_version")?; diff --git a/components/logins/src/store.rs b/components/logins/src/store.rs index 1ddeebc487..7632816ff1 100644 --- a/components/logins/src/store.rs +++ b/components/logins/src/store.rs @@ -5,7 +5,6 @@ use crate::db::{LoginDb, LoginsDeletionMetrics}; use crate::encryption::EncryptorDecryptor; use crate::error::*; use crate::login::{BulkResultEntry, EncryptedLogin, Login, LoginEntry, LoginEntryWithMeta}; -use crate::schema; use crate::LoginsSyncEngine; use parking_lot::Mutex; use sql_support::run_maintenance; @@ -318,17 +317,6 @@ impl LoginStore { .and_then(|enc_login| enc_login.decrypt(db.encdec.as_ref())) } - #[handle_error(Error)] - pub fn set_checkpoint(&self, checkpoint: &str) -> ApiResult<()> { - self.lock_db()? - .put_meta(schema::CHECKPOINT_KEY, &checkpoint) - } - - #[handle_error(Error)] - pub fn get_checkpoint(&self) -> ApiResult> { - self.lock_db()?.get_meta(schema::CHECKPOINT_KEY) - } - #[handle_error(Error)] pub fn run_maintenance(&self) -> ApiResult<()> { let conn = self.lock_db()?; @@ -500,15 +488,6 @@ mod tests { assert_eq!(b_after_update.times_used, 2); } - #[test] - fn test_checkpoint() { - ensure_initialized(); - let store = LoginStore::new_in_memory(); - let checkpoint = "a-checkpoint"; - store.set_checkpoint(checkpoint).ok(); - assert_eq!(store.get_checkpoint().unwrap().unwrap(), checkpoint); - } - #[test] fn test_sync_manager_registration() { ensure_initialized();