Firefox/Projects/AccountManager/CodeOverview

From MozillaWiki
Jump to: navigation, search
Helper
  • base.jsm BaseClass: parent class that others inherit from to get helper functions like pref-controlled logging and async
  • cache.jsm Cache: fifo key/val cache with O(1) retrieval and insertion
Service
  • hostmeta.jsm HostMeta: lookup and cache .well-known/host-meta, which points to where to find the amcd/realm
  • realms.jsm Realms: lookup and cache amcd/realm, which describes how the site handles authentication
  • realms.jsm Realm: temporary realm object that provides accessor to pieces of the amcd and account status
  • service.jsm AccountManager: provides apis for the ui to get realms; installs a nsIWebProgressListener to find realms on page requests
UI
  • accountManager.js: hook up listeners to update the ui on realm/tab changes and set up continuations to interface with profiles
  • browser.xul: adds a popupnotification anchor for account manager interaction
Profile
  • profiles.jsm Profiles: allows registration and lookup of a profile, which provides authentication ui and logic
  • profiles.jsm AbstractAuthProfile: defines interfaces and helper functions for auth profiles
  • accountManager.xml: defines some profile-independent popups (multi-*) and userpass-form-specific ui
  • userPassFormProfile.jsm UPFormProfile: handle userpass account interaction logic and communicate to the server
Makefile
  • Makefile.in: copies jsm to gre/modules/accountmanager
  • README: how to generate parser modules
Parser
  • link-header-parser.js, status-parser.js: parser definition to feed to jison
  • linkHeaderParser.jsm, statusParser.jsm: generated parser
Test
  • browser_basic.js: end-to-end test of ui interactions for signing in, signing out
  • browser_connect.js: test caching of amcd