forked from mozilla/application-services
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement register_for_sync_manager() for places (mozilla#4617)
- Changed the bookmarks/history sync engines to use an Arc<Mutex<PlacesDb>>, which matches the other engines better - Made these sync engines create their own `SqlInterruptScope`. The interrupt code is still not working, but I think this is the direction we want to go for mozilla#1684. If not, it should be easy to replace. - Updated the `PlacesApi` syncing code to use the new sync engines. One thing to note here is that the SyncManager has its own system of managing the global state, so the fact that those methods update it outside of the Mutex lock that the `SyncEngine` takes is not a problem. - Updated the importer code to use the new `get_sync_connection()` method. The only difference here is that the importer code needs to lock the mutex, this replaces the old system where `open_sync_connection()` would return an error if a previously returned connection was still alive. - Removed the old `PlacesApi.open_sync_connection()` method and replaced it with the new `get_sync_connection()` method - Lots of unit test updates. I didn't take the time to understand these fully. I just made changes until it compiled, didn't deadlock, and passed.
- Loading branch information
Showing
11 changed files
with
273 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.