Name Description Size
auth.rs 8243
close_tabs.rs 19682
commands
config.rs 14327
device.rs 33521
http_client.rs Low-level API for talking to the FxA server. This module is responsible for talking to the FxA server over HTTP, serializing request bodies and deserializing response payloads into live objects that can be inspected by other parts of the code. 40225
mod.rs # Internal implementation details for the fxa_client crate. 22990
oauth
oauth.rs 43579
profile.rs 8332
push.rs 11592
scoped_keys.rs 4509
scopes.rs 315
send_tab.rs 5961
state_manager.rs 11171
state_persistence.rs Serialization of `FirefoxAccount` state to/from a JSON string. This module implements the ability to serialize a `FirefoxAccount` struct to and from a JSON string. The idea is that calling code will use this to persist the account state to storage. Many of the details here are a straightforward use of `serde`, with all persisted data being a field on a `State` struct. This is, however, some additional complexity around handling data migrations - we need to be able to evolve the internal details of the `State` struct while gracefully handing users who are upgrading from an older version of a consuming app, which has stored account state from an older version of this component. Data migration is handled by explicitly naming different versions of the state struct to correspond to different incompatible changes to the data representation, e.g. `StateV1` and `StateV2`. We then wrap this in a `PersistedStateTagged` enum whose serialization gets explicitly tagged with the corresponding state version number. For backwards-compatible changes to the data (such as adding a new field that has a sensible default) we keep the current `State` struct, but modify it in such a way that `serde` knows how to do the right thing. For backwards-incompatible changes to the data (such as removing or significantly refactoring fields) we define a new `StateV{X+1}` struct, and use the `From` trait to define how to update from older struct versions. For an example how the conversion works, [we can look at `StateV1` which was deliberately removed](https://github.com/mozilla/application-services/issues/3912) The code that was deleted demonstrates how we can implement the migration 10195
telemetry.rs 4606
util.rs 1629