diff --git a/CHANGELOG.md b/CHANGELOG.md index c16e0ca4cd..25373682fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # v117.0 (In progress) +## General + +### 🦊 What's Changed 🦊 + +- Removed obsolete sync functions that were exposed for Firefox iOS prior to the sync manager component integration ([#5725](https://github.com/mozilla/application-services/pull/5725)). + ## Nimbus SDK ⛅️🔬🔭 ### ✨ What's New ✨ diff --git a/components/logins/ios/Logins/LoginsStorage.swift b/components/logins/ios/Logins/LoginsStorage.swift index 7ef9e4a54d..85316616a8 100644 --- a/components/logins/ios/Logins/LoginsStorage.swift +++ b/components/logins/ios/Logins/LoginsStorage.swift @@ -21,21 +21,6 @@ open class LoginsStorage { store = try LoginStore(path: databasePath) } - /// Delete all locally stored login sync metadata. It's unclear if - /// there's ever a reason for users to call this - open func reset() throws { - try queue.sync { - try self.store.reset() - } - } - - /// Delete all locally stored login data. - open func wipe() throws { - try queue.sync { - try self.store.wipe() - } - } - open func wipeLocal() throws { try queue.sync { try self.store.wipeLocal() @@ -103,19 +88,6 @@ open class LoginsStorage { self.store.registerWithSyncManager() } } - - open func sync(unlockInfo: SyncUnlockInfo) throws -> String { - return try queue.sync { - try self.store - .sync( - keyId: unlockInfo.kid, - accessToken: unlockInfo.fxaAccessToken, - syncKey: unlockInfo.syncKey, - tokenserverUrl: unlockInfo.tokenserverURL, - localEncryptionKey: unlockInfo.loginEncryptionKey - ) - } - } } public func migrateLoginsFromSqlcipher( diff --git a/components/logins/src/logins.udl b/components/logins/src/logins.udl index d052604962..92486467c8 100644 --- a/components/logins/src/logins.udl +++ b/components/logins/src/logins.udl @@ -158,7 +158,4 @@ interface LoginStore { [Self=ByArc] void register_with_sync_manager(); - - [Throws=LoginsApiError, Self=ByArc] - string sync(string key_id, string access_token, string sync_key, string tokenserver_url, string local_encryption_key); }; diff --git a/components/places/ios/Places/Places.swift b/components/places/ios/Places/Places.swift index 25f5a767fd..dde87d07ee 100644 --- a/components/places/ios/Places/Places.swift +++ b/components/places/ios/Places/Places.swift @@ -70,105 +70,6 @@ public class PlacesAPI { } } - /** - * Sync the bookmarks collection. - * - * - Returns: A JSON string representing a telemetry ping for this sync. The - * string contains the ping payload, and should be sent to the - * telemetry submission endpoint. - * - * - Throws: - * - `PlacesApiError.databaseInterrupted`: If a call is made to `interrupt()` on this - * object from another thread. - * - `PlacesApiError.unexpected`: When an error that has not specifically been exposed - * to Swift is encountered (for example IO errors from - * the database code, etc). - * - `PlacesApiError.panic`: If the rust code panics while completing this - * operation. (If this occurs, please let us know). - */ - open func syncBookmarks(unlockInfo: SyncUnlockInfo) throws -> String { - return try queue.sync { - try self.api.bookmarksSync( - keyId: unlockInfo.kid, - accessToken: unlockInfo.fxaAccessToken, - syncKey: unlockInfo.syncKey, - tokenserverUrl: unlockInfo.tokenserverURL - ) - } - } - - /** - * Sync the History collection. - * - * - Returns: A JSON string representing a telemetry ping for this sync. The - * string contains the ping payload, and should be sent to the - * telemetry submission endpoint. - * - * - Throws: - * - `PlacesApiError.databaseInterrupted`: If a call is made to `interrupt()` on this - * object from another thread. - * - `PlacesApiError.unexpected`: When an error that has not specifically been exposed - * to Swift is encountered (for example IO errors from - * the database code, etc). - * - `PlacesApiError.panic`: If the rust code panics while completing this - * operation. (If this occurs, please let us know). - */ - open func syncHistory(unlockInfo: SyncUnlockInfo) throws -> String { - return try queue.sync { - try self.api.historySync( - keyId: unlockInfo.kid, - accessToken: unlockInfo.fxaAccessToken, - syncKey: unlockInfo.syncKey, - tokenserverUrl: unlockInfo.tokenserverURL - ) - } - } - - /** - * Resets all sync metadata for history, including change flags, - * sync statuses, and last sync time. The next sync after reset - * will behave the same way as a first sync when connecting a new - * device. - * - * This method only needs to be called when the user disconnects - * from Sync. There are other times when Places resets sync metadata, - * but those are handled internally in the Rust code. - * - * - Throws: - * - `PlacesApiError.databaseInterrupted`: If a call is made to `interrupt()` on this - * object from another thread. - * - `PlacesApiError.unexpected`: When an error that has not specifically been exposed - * to Swift is encountered (for example IO errors from - * the database code, etc). - * - `PlacesApiError.panic`: If the rust code panics while completing this - * operation. (If this occurs, please let us know). - */ - open func resetHistorySyncMetadata() throws { - return try queue.sync { - try self.api.resetHistory() - } - } - - /** - * Resets all sync metadata for bookmarks, including change flags, sync statuses, and - * last sync time. The next sync after reset will behave the same way as a first sync - * when connecting a new device. - * - * - Throws: - * - `PlacesApiError.databaseInterrupted`: If a call is made to `interrupt()` on this - * object from another thread. - * - `PlacesApiError.unexpected`: When an error that has not specifically been exposed - * to Swift is encountered (for example IO errors from - * the database code, etc). - * - `PlacesApiError.panic`: If the rust code panics while completing this - * operation. (If this occurs, please let us know). - */ - open func resetBookmarkSyncMetadata() throws { - return try queue.sync { - try self.api.bookmarksReset() - } - } - open func registerWithSyncManager() { queue.sync { self.api.registerWithSyncManager() @@ -877,13 +778,6 @@ public class PlacesWriteConnection: PlacesReadConnection { } } - open func wipeLocalHistory() throws { - try queue.sync { - try self.checkApi() - try self.conn.wipeLocalHistory() - } - } - open func deleteEverythingHistory() throws { try queue.sync { try self.checkApi() diff --git a/components/tabs/ios/Tabs/Tabs.swift b/components/tabs/ios/Tabs/Tabs.swift index 342dd73d32..1b977b70e1 100644 --- a/components/tabs/ios/Tabs/Tabs.swift +++ b/components/tabs/ios/Tabs/Tabs.swift @@ -26,32 +26,9 @@ open class TabsStorage { } } - open func reset() throws { - try queue.sync { - try self.store.reset() - } - } - open func registerWithSyncManager() { queue.sync { self.store.registerWithSyncManager() } } - - open func sync(unlockInfo: SyncUnlockInfo) throws -> String { - guard let tabsLocalId = unlockInfo.tabsLocalId else { - throw TabsApiError.UnexpectedTabsError(reason: "tabs local ID was not provided") - } - - return try queue.sync { - try self.store - .sync( - keyId: unlockInfo.kid, - accessToken: unlockInfo.fxaAccessToken, - syncKey: unlockInfo.syncKey, - tokenserverUrl: unlockInfo.tokenserverURL, - localId: tabsLocalId - ) - } - } } diff --git a/components/tabs/src/tabs.udl b/components/tabs/src/tabs.udl index cb659343f1..effd680705 100644 --- a/components/tabs/src/tabs.udl +++ b/components/tabs/src/tabs.udl @@ -26,12 +26,6 @@ interface TabsStore { [Self=ByArc] void register_with_sync_manager(); - [Throws=TabsApiError, Self=ByArc] - void reset(); - - [Throws=TabsApiError, Self=ByArc] - string sync(string key_id, string access_token, string sync_key, string tokenserver_url, string local_id); - [Self=ByArc] TabsBridgedEngine bridged_engine();