Skip to content
  • Grisha Kruglov's avatar
    Part 4: Make AccountStorage non-configurable in FxaAccountManager · 9186ba75
    Grisha Kruglov authored
    In order to sync, a background worker needs to have access to the current account.
    We could serialize the account information as part of the Data object that the worker
    will operate over, but that's potentially problematic, as we'll inevitably risk our
    serialized account information will become stale by the time worker runs.
    
    This means that it's much better if we can just create an instance of the current account
    inside the worker. For that, it needs to have access to the account storage object mechanism
    that's used within the AccountManager. Rather than dealing with making SyncManager
    configurable with different types of account storage implementations, let's assume
    we're going to use a single one, defined in the services-fxa module. This makes
    our life easier for now, and is easy enough to re-visit in the future if we need to.
    9186ba75