This was largely done manually to try and bring app-services and
mozilla-central closer together. With this patch we can vendor
into mozilla-central, including when most of our mobile crates are
built into libxul in the Android monorepo, oak.
This patch also re-forks find-places-db to avoid using a now orhpaned
crate which no mozilla staff had access to update.
* create-fake-visits will create a (possibly large) number of visits.
* delete-history will remove all history
* show-stats will show some stats for the places DB.
* Moves sync15::error to a simple enum in line with most other crates.
* Cleanups to Cargo.toml in sync15 and sync15-traits
* Remove old unused sync15::migrate_state
The `SqlInterruptHandle` and `SqlInterruptScope` types and especially
the shutdown code feels like belongs in `interrupt-support` better than
`sql-support`.
Removed the `implement_into_ffi_by_pointer!(SqlInterruptHandle)` call.
I don't think we need that now that everything is UniFFIed.
When the user wants to shutdown the application, we should:
- Interrupt all current `SqlInterruptScope`s
- Interrupt all future `SqlInterruptScope`s when they're created.
The nice thing about this approach is that it didn't require invasive
changes in places to support it. The main new requirement was we need
to have a way to get a `Weak<AsRef<SqlInterruptHandler>>` for each
database. In order to support that, I needed to:
- For the read/write and read-only connections: have `PlacesConnection`
store an `SqlInterruptHandler` and implement `AsRef`.
- For the sync connection: Added struct that wraps the
`Mutex<PlacesDb>` and also stores a `SqlInterruptHandler` and
implements `AsRef`.
Updated `places-utils` so that ctrl-c starts shutdown mode.