Add address metadata APIs and a bridged sync engine to autofill - #7513
Open
DimiDL wants to merge 1 commit into
Open
Add address metadata APIs and a bridged sync engine to autofill#7513DimiDL wants to merge 1 commit into
DimiDL wants to merge 1 commit into
Conversation
Firefox Desktop is moving its address storage to this component and needs two things that are not currently exposed. Storage APIs for importing records already persisted elsewhere - add_address_with_meta, add_many_addresses_with_meta, update_address_with_meta and add_many_address_tombstones - taking a caller-supplied guid, timestamps and change counter. The bulk variants run each record in a savepoint so one bad record neither aborts the migration nor leaves a row behind. Carrying the change counter means update_internal_address now takes a CounterUpdate of Increment, Leave or Set(i64). A bridged sync engine, so Desktop's Sync framework can drive address sync: Store::addresses_bridged_engine() exposes the address engine the crate already has, which only implemented sync15::SyncEngine and so was unreachable from Desktop's mozIBridgedSyncEngine. Nothing on mobile calls any of this; it is additive for the Desktop migration.
DimiDL
force-pushed
the
autofill-address-meta-and-bridged-engine
branch
from
July 31, 2026 13:24
d3d44c2 to
4cf1cf6
Compare
jo
approved these changes
Jul 31, 2026
jo
left a comment
Contributor
There was a problem hiding this comment.
This looks good, I esp. like with_savepoint.
I think we could go without support for sync_change_counter update via AddressMeta because when this is used during import (where I think it is designed for) the local mirror will be always empty and the record is transferred anyway.
Note that this will race with #7483 which greatly simplifies the sync bridge code.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Firefox Desktop is moving its address storage to this component and needs two things that are not currently exposed.
Storage APIs for importing records already persisted elsewhere - add_address_with_meta, add_many_addresses_with_meta, update_address_with_meta and add_many_address_tombstones - taking a caller-supplied guid, timestamps and change counter. The bulk variants run each record in a savepoint so one bad record neither aborts the migration nor leaves a row behind. Carrying the change counter means update_internal_address now takes a CounterUpdate of Increment, Leave or Set(i64).
A bridged sync engine, so Desktop's Sync framework can drive address sync: Store::addresses_bridged_engine() exposes the address engine the crate already has, which only implemented sync15::SyncEngine and so was unreachable from Desktop's mozIBridgedSyncEngine.
Nothing on mobile calls any of this; it is additive for the Desktop migration.
Pull Request checklist
[ci full]to the PR title.