Commit Graph
2336 Commits
Author SHA1 Message Date
Mark Hammond 8a9249fc6c Bug 1342851 - record the last-modified time of a Sync client record. r=rnewman
MozReview-Commit-ID: 2jtCsl3sy3X
2017-02-27 12:44:12 +11:00
Thom Chiovoloni 2c7c2e5891 Bug 1321740 - Avoid a full sync after signing in due to fxa reauthentication. r=markh
MozReview-Commit-ID: 8wVq1RYojUS
2017-02-21 16:18:43 -05:00
Kit Cambridge 6168ac2527 Bug 1335752 - Disable persistence and clean up after RotaryEngine in tests. r=markh
MozReview-Commit-ID: 8feE9O6Dv3W
2017-02-13 13:48:08 -08:00
Kit Cambridge 143ae1702c Bug 1335752 - Remove all observers when finalizing the tracker. r=markh
MozReview-Commit-ID: CKc19VAO9WW
2017-02-13 13:16:30 -08:00
Thom Chiovoloni 49e04a2ba3 Bug 1337993 - Ensure we mark all current bookmarks for reupload when bookmark engine enabled state changes. r=kitcambridge
MozReview-Commit-ID: 4gOmqrzUr77
2017-02-13 14:28:06 -05:00
Edouard Oger 1fa2484c6f Bug 1244622 - Add "Show More/All" (tabs) buttons in the Synced Tabs menu. r=markh
MozReview-Commit-ID: 7z9fTVCDGgF
2017-02-06 16:31:31 -05:00
Thom Chiovoloni ca056f75a4 Bug 1336186 - Check separator position in sync bookmark validator. r=markh
This reverts bug 1276152.

MozReview-Commit-ID: Cdv4XPYl4cp
2017-02-15 16:30:59 -05:00
Carsten "Tomcat" Book 9fbc541997 merge mozilla-inbound to mozilla-central a=merge 2017-02-20 14:05:25 +01:00
Mark Hammond d06b8ce577 Bug 1319972 - write a session ID to sync logs. r=tcsc
MozReview-Commit-ID: GY8tvMVJ0p1
2017-02-17 15:38:11 +11:00
Mark Hammond c3ba567079 Bug 1340357 - remove all special eslint rules in services/. r=eoger
MozReview-Commit-ID: 6zMOBoWLOhJ
2017-02-17 12:34:45 +11:00
Carsten "Tomcat" Book 9d3beb92ef merge mozilla-inbound to mozilla-central a=merge 2017-02-16 13:15:55 +01:00
Mayank Srivastav 32aa0d6eed Bug 1337188 - Remove unused return statement from EngineManager::register. r=kit 2017-02-15 00:42:10 +05:30
Ethan Glasser-Camp 8e51fef619 Bug 1321570 - use dependency injection for fxAccounts, r=kmag
Get rid of the ugly hack where test code monkeypatches a singleton to
convince the rest of the ExtensionStorageSync code that a fake user is
logged in. Instead, take a handle to the fxAccounts service at
construction time. Test code can provide any kind of fxAccounts it
wants, including one that has a hard-coded user.

This provokes a bunch of changes:

- ExtensionStorageSync is now no longer a singleton, but a class. You
  have to instantiate it in order to do anything with it. A global
  instance extensionStorageSync is provided for use by Sync code as
  well as WebExtension code.

- CryptoCollection is now also a class, and each ExtensionStorageSync
  instance has its own CryptoCollection. This dependency should maybe
  also be injected, but for the time being it doesn't provide us any
  value to do so.

- Converting singletons with asynchronous methods to classes is a pain
  in the neck. We convert async method foo from `foo:
  Task.async(....)` to `async foo() { .... }`. While we're here,
  convert KeyRingEncryptionRemoteTransformer#decode to async/await to
  eliminate a need for `let self = this`.

- Update Sync code and WebExtension code to use extensionStorageSync.

- There's a cyclic dependency where CryptoCollection#sync depends on
  ExtensionStorageSync#_syncCollection which depends on
  CryptoCollection#getKeyRing. As a short-term hack, we now require an
  ExtensionStorageSync argument to CryptoCollection#sync.

- KeyRingEncryptionRemoteTransformer now takes a handle to fxAccounts
  on construction time as well. Because this is the only
  EncryptionRemoteTransformer subclass that accesses fxAccounts, we
  can get rid of the hack where the tests monkeypatch something in the
  EncryptionRemoteTransformer prototype.

- CollectionKeyEncryptionRemoteTransformer now takes a handle to a
  CryptoCollection, rather than relying on a global one.

- A bunch of methods that previously assumed access to fxAccounts now
  check if fxAccounts is present (i.e. if we're on Android). Strictly
  speaking, this isn't required by this change, but it helps make
  certain kinds of failure a little easier to diagnose.

- Update tests, including extracting a domain-specific helper method
  to hide the use of CollectionKeyEncryptionRemoteTransformer. We now
  no longer monkeypatch in our mock fxaService, but pass it to the
  test so that it can do whatever it wants with it. We also provide an
  ExtensionStorageSync instance for convenience. Access to the global
  cryptoCollection is now done through an ExtensionStorageSync
  instance.

To summarize, we've gone from a situation where a bunch of singletons
had implicit dependencies on other singletons in a shared global
namespace, to a situation where dependencies are provided explicitly
using method/constructor arguments. This highlights some of the
dependencies present:

- ExtensionStorageSync depends on CryptoCollection and fxAccounts if
  it needs to sync

- Every collection created via openCollection needs a handle to
  CryptoCollection so it can correctly create its remote transformers

- CryptoCollection needs a handle to fxAccounts so it can create its
  own remote transformer for its special collection

Most of this is only possible, or at least much easier, because we no
longer try to juggle Sqlite connections but just keep one around
forever.

However, please note:

- CryptoCollection needs a handle to ExtensionStorageSync to actually
  perform syncing logic because that's where we foolishly put the
  logic to make requests

- There's still a backing Sqlite store which is shared by everything

- There's still a singleton tracking contexts that opened extensions
  which we manage to try to clean contexts up correctly

MozReview-Commit-ID: DGIzyRTdYZ1
2017-01-10 16:44:01 -05:00
Ethan Glasser-Camp 447d4b287d Bug 1321570 - Move ExtensionStorageSync crypto out of services/sync, r=kmag
Since services/sync doesn't ship on Android, this meant
conditionally-defining some variables such as `cryptoCollection` and
`CollectionKeyEncryptionRemoteTransformer` depending on whether or not
we were on Android. However, none of these definitions really rely on
functionality that isn't present on Android (although you can't really
use them yet either). Move the dependency together with the dependant
code so we can simplify a bit. This lets us remove conditional uses of
`cryptoCollection` and `CollectionKeyEncryptionRemoteTransformer`.

Because the WebExtensions source directory has more stringent eslint
rules, we end up reformatting and commenting a bit in addition to
moving.

MozReview-Commit-ID: 2ddDeymYFNi
2017-02-13 15:06:02 -05:00
Wes Kocher 0db163af05 Backed out changeset 174570c9ca6b (bug 1321740) for browser_sanitizeDialog.js failures a=backout
MozReview-Commit-ID: 8zmWz4JBCVk
2017-02-15 15:02:59 -08:00
Thom Chiovoloni cbc4525b4f Bug 1321740 - Avoid a full sync after signing in due to fxa reauthentication. r=markh
MozReview-Commit-ID: 8wVq1RYojUS
2017-02-08 16:35:00 -05:00
Mark Hammond b28105febf Bug 1338439 - Sync event telemetry should use the same flowID when sending a command to multiple clients, and should include a reason for some commands. r=tcsc
MozReview-Commit-ID: 7a6qjRUswGL
2017-02-10 16:49:33 +11:00
Kit Cambridge 7e41747cd6 Bug 1338668 - Ignore tag query folder IDs when comparing client and server bookmark records. r=tcsc
MozReview-Commit-ID: 2Mz9fTsTou5
2017-02-10 15:03:34 -08:00
Ethan Glasser-Camp 3e4199a169 Bug 1333810: Hash record IDs during encryption, r=kmag,rnewman
This does a sha256 of record IDs, the same way we do for collection
IDs, during encryption.

The way we compute the new ID (using an overridden method) is a little
bit of a hack, but we use the new ID as part of the HMAC. This also
invalidates a previous assumption, which is that we kept record IDs
the same during decryption.

MozReview-Commit-ID: Gbzlo9OE1he
2017-01-31 13:09:38 -05:00
Ethan Glasser-Camp a344b6ea54 Bug 1333810: Encrypt record deletes, r=kmag,rnewman
Camouflage deletes as updates, according to the rules given by the new
RemoteTransformer contract.

MozReview-Commit-ID: CwVJSs2jOil
2017-01-27 19:27:10 -05:00
Edouard Oger acc4226c17 Bug 1332556 - Set correct passwords' timestamps on first Sync. r=markh
MozReview-Commit-ID: Izg9sIeGNJo
2017-02-07 12:56:56 -05:00
Ahsan 89fb4c0e76 Bug 1336282 - Moved bookmark frecency query into PlacesSyncUtils. r=kitcambridge
MozReview-Commit-ID: 4DDXOUQ2C8N
2017-02-09 12:28:26 -08:00
Kit Cambridge 49005708a9 Bug 1323867 - Bump bookmark validation threshold to 1k. r=tcsc
This patch also refactors `compareServerWithClient` and
`inspectServerRecords` to periodically yield back to the main thread,
since validating a large number of bookmarks in a tight loop causes
jank. Yielding every 50 records for 50ms is somewhat arbitrary, but
keeps things snappy for my profile (2947 records).

MozReview-Commit-ID: 99DJtNvNeHI
2017-01-12 14:02:45 -07:00
Kit Cambridge 53c682f8c9 Bug 1325523 - Persist tracked IDs on finalization, and don't persist IDs in Sync tests. r=markh
MozReview-Commit-ID: CpQP2aM1DO
2017-02-07 11:51:06 -08:00
Mark Hammond fb11d2db3d Bug 1310065 - use more reliable preferences for calculating the client count in the sync scheduler. r=eoger
This patch switches to using preferences written by the clients engine to
determine the number of clients so it's correct before the first sync for
a browser session.

It also fixes another bug I discovered - if a mobile device dropped from the
client list, the preference for the number of mobile devices would remain at
1 rather than resetting to zero.

MozReview-Commit-ID: IPythSQcorx
2017-01-25 18:11:05 +11:00
Edouard Oger 2f1e9c9c65 Bug 1329850 - Sync records creation failures are reported to telemetry. r=markh
MozReview-Commit-ID: AEOlmkmyIvY
2017-01-24 17:05:12 -05:00
Sebastian Hengst 7b607ad74e Backed out changeset 20863de3b8f4 (bug 1329850) for eslint failure: redeclaration of collection in deeper scope in test_syncengine_sync.js. r=backout 2017-01-31 18:46:39 +01:00
Edouard Oger 4736da4ef8 Bug 1329850 - Sync records creation failures are reported to telemetry. r=markh
MozReview-Commit-ID: AEOlmkmyIvY
2017-01-24 17:05:12 -05:00
Mark Banner 77e3bf9a9f Bug 1333044 - Enable no-undef eslint rule for services/. r=markh
MozReview-Commit-ID: IrtWclENDth
2017-01-23 15:15:05 +00:00
Edouard Oger 544071d2e2 Bug 1296767 part 13 - Repair Weave Service getStorageInfo. r=markh
MozReview-Commit-ID: E4S5xYTNDIH
2017-01-27 13:31:58 -05:00
Edouard Oger cc90781b2b Bug 1296767 part 11 - Remove Weave.Service.serverURL and friends. r=markh
MozReview-Commit-ID: Kmsxn10sA2X
2017-01-27 13:31:58 -05:00
Edouard Oger e1b2e4cb1b Bug 1296767 part 10 - Remove FxA Migration code. r=markh
MozReview-Commit-ID: DamrbblcMmZ
2017-01-27 13:31:58 -05:00
Edouard Oger 434f3e3c75 Bug 1296767 part 7 - Remove non-in-content legacy Sync pref screens. r=markh
MozReview-Commit-ID: LK9akz4chd1
2017-01-27 13:31:57 -05:00
Edouard Oger c3e9854932 Bug 1296767 part 6 - Remove startOverKeepIdentity pref. r=markh
MozReview-Commit-ID: 7YDYTCRiKZa
2017-01-27 13:30:48 -05:00
Edouard Oger 8dedb7b93f Bug 1296767 part 3 - Make BrowserID the only Sync identity manager. r=markh
MozReview-Commit-ID: IC7kRjgtPp8
2017-01-27 13:30:47 -05:00
Edouard Oger 11288e6cb3 Bug 1296767 part 2 - Remove Sync UserApi. r=markh
MozReview-Commit-ID: CdgLxCN52Os
2017-01-27 13:30:47 -05:00
Edouard Oger c4f4d99837 Bug 1296767 part 1 - Remove J-PAKE from Sync. r=markh
MozReview-Commit-ID: iD4OJv436i
2017-01-27 13:30:47 -05:00
Wes Kocher 092fa0f3bc Backed out 13 changesets (bug 1296767) for xpcshell failures a=backout CLOSED TREE
Backed out changeset 41ed77788333 (bug 1296767)
Backed out changeset 1c0c9289b532 (bug 1296767)
Backed out changeset 50294db1d871 (bug 1296767)
Backed out changeset 26c065f79c54 (bug 1296767)
Backed out changeset 0362a78d6978 (bug 1296767)
Backed out changeset 4e71cf94e4ee (bug 1296767)
Backed out changeset f6f59447d22a (bug 1296767)
Backed out changeset 6c9b792cc296 (bug 1296767)
Backed out changeset 46a52b10a868 (bug 1296767)
Backed out changeset 5d70d87d2a8f (bug 1296767)
Backed out changeset 8219686be6a2 (bug 1296767)
Backed out changeset 0a989b0cea67 (bug 1296767)
Backed out changeset 9f59a0b75c1f (bug 1296767)

MozReview-Commit-ID: 2XBNsd8JrZL
2017-01-26 11:16:12 -08:00
Edouard Oger 314ecc0f3a Bug 1296767 part 13 - Repair Weave Service getStorageInfo. r=markh
MozReview-Commit-ID: E4S5xYTNDIH
2017-01-23 15:19:04 -05:00
Edouard Oger 4ab11983cc Bug 1296767 part 11 - Remove Weave.Service.serverURL and friends. r=markh
MozReview-Commit-ID: Kmsxn10sA2X
2017-01-19 13:19:33 -05:00
Edouard Oger 92d56eda1d Bug 1296767 part 10 - Remove FxA Migration code. r=markh
MozReview-Commit-ID: DamrbblcMmZ
2017-01-19 13:03:38 -05:00
Edouard Oger 28c8fa59f2 Bug 1296767 part 7 - Remove non-in-content legacy Sync pref screens. r=markh
MozReview-Commit-ID: LK9akz4chd1
2017-01-18 17:39:11 -05:00
Edouard Oger caef65cbcc Bug 1296767 part 6 - Remove startOverKeepIdentity pref. r=markh
MozReview-Commit-ID: 7YDYTCRiKZa
2017-01-18 16:30:38 -05:00
Edouard Oger e7260315e3 Bug 1296767 part 3 - Make BrowserID the only Sync identity manager. r=markh
MozReview-Commit-ID: IC7kRjgtPp8
2017-01-13 15:02:21 -05:00
Edouard Oger 86037cb684 Bug 1296767 part 2 - Remove Sync UserApi. r=markh
MozReview-Commit-ID: CdgLxCN52Os
2017-01-13 15:54:46 -05:00
Edouard Oger 8624a758c7 Bug 1296767 part 1 - Remove J-PAKE from Sync. r=markh
MozReview-Commit-ID: iD4OJv436i
2017-01-10 13:47:24 -05:00
Kit Cambridge a0fd009291 Bug 1332024 - Finalize tracker storage and consolidate cleanup logic in engine tests. r=markh
MozReview-Commit-ID: 8t9bXFrLA1Z
2017-01-24 09:59:09 -08:00
Edouard Oger 5ff4b703c8 Bug 1319433 - Bump tabs engine TTL to 21 days. r=markh
MozReview-Commit-ID: GdEZkQEdZMD
2017-01-23 11:05:41 -05:00
Carsten "Tomcat" Book 0bdae610bb Backed out changeset 9c6b98edac72 (bug 1333044) 2017-01-25 15:29:33 +01:00
Mark Banner a2f161f18a Bug 1333044 - Enable no-undef eslint rule for services/. r=markh
MozReview-Commit-ID: IrtWclENDth
2017-01-23 15:15:05 +00:00