SyncEngine now uses the getChangedIDs() method to get all changed IDs before a sync. By default this still goes through the tracker, but engines can override this method to do queries based on timestamps, or to bypass the tracker entirely.
SyncEngine now also exposes a lastSyncLocal property that keeps the local timestamp of the last sync so that engines can do timestamp based queries.
Fix a 'this' scoping error in SyncEngine._testDecrypt(). Rename this method to canDecrypt() since it's clearly public API.
Provide tests for SyncEngine.canDecrypt() as well as Service.wipeClient().
Make WBORecord.uri, CryptoWrapper.encryption, PubKey.privateKeyUri, PrivKey.publicKeyUri as well as the CryptoMeta keyring keys relative URLs in the payload. As a result, all records now *must* know their URI.
Bump storage version from 2 to 3 to trigger reupload of all data and exclude older clients.
Explicitly check the status code to make sure we stop syncing on non-404 crypto meta failures. Add tests to check correct behavior of 404 and non-404 errors during syncStartup.
Remove status bar icon/text for setup/connect/sync status. Add menuitem for setting up sync instead of drilling down a 1-item submenu that leads to a button. Remove unused Engine.displayName and related strings.
Make sure to clear local cache when deleting crypto records from the server. Handle missing crypto by deleting any existing data and reuploading. Fix broken records by uploading new ones.
Save the time the tracker adds a new changed id and use that to compare the age of the record on the server vs the age of the local change to decide if it's server wins or client wins. Fix up various direct uses of changedIDs to use the API and make the save-to-disk lazy to avoid excessive writes. Add a test to make sure addChangedID only increases in time.
Write a FormWrapper that knows about GUIDs and get/sets them in moz_formhistory as needed. It lazily adds the columns on failure and lazily generates GUIDs for entries that are missing it. Don't eagerly create a sha1 formItem mapping -- don't create it at all, so empty syncs will be much faster too.
Add an engines object to meta/global to track version and syncID for each engine. If the server is outdated, wipe the data and set a new version and syncID. If the client is oudated, ask for an upgrade. Differing syncIDs cause a reupload. All engines are right now the default version 1.
Inline various _init calls and do super's init with <Super>.call(this, args..). Add various get/set sugar to those missing e.g., meta.keyring. Also simplify crypto record creation by setting cleartext in the parent.
--HG--
extra : rebase_source : 6c9a9f210f8f46ac338adb84188538e7353c9673
Include the URI on success/fail requests and only trace log the onStartRequest. Switch various debug messages to trace and remove importing Log4Moz in fx-weave-overlay and generic-change. Drop the rootLogger to Debug to not log trace messages from unpreffed loggers.
Limit the initial the first fetch of new items by a total number of fetch and subtract the number of items processed. Use the difference to keep fetching more items from the backlog in chunks.