Personal tools

Mobile/Projects/Java-side replacement for nsILoginManager

From MozillaWiki

Jump to: navigation, search

Contents

Tracking

bug 946857

Goals

Main-thread I/O is evil. bug 853549 aims to remove this from password manager by eliminating the use of signons.sqlite altogether, switching to a JSON representation.

Unfortunately, on Android we need simultaneous access to the passwords store from two processes, because our PasswordsProvider must exist independently of Gecko. We can't simultaneously read and write from a JSON file on disk, so we need to rework our implementation.

The goals of this project are:

  • Unblock desktop from landing their perf improvements.
  • Preserve the ability to sync and use the browser either at the same time or independently.
  • Ideally: get some perf wins, too.
  • Ideally: fix Master Password on Fennec.

Possibilities

  • Keep signons.sqlite on Android, change nothing. This is painful.
  • Keep signons.sqlite, wrapped in PasswordsProvider. Implement a new nsILoginManagerStorage class that talks to the CP. This is a good first step.
  • Then replace the PasswordsProvider implementation with something that doesn't use sqlite at all, and doesn't use NSS.
  • Eliminate the use of NSS and moz's own sqlite library (do-able now that we're not sharing a database with Gecko), and move PasswordsProvider into the same process as the rest of Fennec.
  • While we're doing this, adjust how we do Master Password -- preserve the key in-memory, 'lock' when you close the browser, or after a timeout.

Justification

We're kinda blocking desktop performance improvements, and this area has been ripe for fixing for a while. Add to this the possibility to lower memory and disk usage, and allow for syncing with MP enabled (and fix bug 939900, too), and this seems justifiable.

References and other info

Quality criteria

  • No user-perceptible performance degradation
  • All goals are met