Commit Graph

4334 Commits

Author SHA1 Message Date
Vlad Filippov
cf78a3d737 Bug 1635937 - Enable 'identity.sync.useOAuthForSyncToken' pref for Nightly users r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75130
2020-05-19 21:32:50 +00:00
Vlad Filippov
a3a78de9e9 Bug 1637827 - Handle expired OAuth tokens while provisioning Sync tokens r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75630
2020-05-18 22:46:51 +00:00
Vlad Filippov
5bc4cabe33 Bug 1633641 - Provide a method to fetch an OAuth token and its key in a single operation. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D74534
2020-05-18 01:13:46 +00:00
Edouard Oger
30060195fb Bug 1631630 p2 - Implement FxAccounts rust-bridge. r=lina,rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D71852
2020-05-16 01:07:31 +00:00
Noemi Erli
cac2780d42 Backed out 2 changesets (bug 1631630) for causing mass braoser chrome failures CLOSED TREE
Backed out changeset 9b8606a93c75 (bug 1631630)
Backed out changeset d57ea5d1921f (bug 1631630)
2020-05-16 02:16:33 +03:00
Edouard Oger
9b739cf68d Bug 1631630 p2 - Implement FxAccounts rust-bridge. r=lina,rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D71852
2020-05-15 20:13:36 +00:00
Mark Hammond
1b47bf54f2 Bug 1635352 (part 2) - Add TPS test for new extension-storage engine. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D74610
2020-05-15 01:30:21 +00:00
Mark Hammond
5de4cd6458 Bug 1635352 (part 1) - Add a new bridged extension-storage engine. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D74609
2020-05-15 01:30:14 +00:00
Mark Hammond
6e4d1af4af Bug 1623245 - A new browser.storage.sync local storage implementation, pref'd off. r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D67273
2020-05-15 01:29:56 +00:00
Lina Cambridge
390e79aba0 Bug 1637809 - Replace try_fold with map in Golden Gate. r=eoger
Differential Revision: https://phabricator.services.mozilla.com/D75226
2020-05-14 00:00:18 +00:00
Edouard Oger
6e8ef040d3 Bug 1637537 - Bump application-services and anyhow versions. r=vladikoff
Differential Revision: https://phabricator.services.mozilla.com/D75150
2020-05-13 18:36:56 +00:00
Michael Kaply
bd4fad19d2 Bug 1487529 - Don't sync addons prevented by policy. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D74889
2020-05-13 17:13:23 +00:00
Lina Cambridge
d2af2ad1c8 Bug 1636365 - Add more docs for BridgedEngine, and remove BridgedTracker. r=markh,rfkelly
Now that we have a `Tracker` base class without persistence, we can
have bridged engines subclass it directly.

Differential Revision: https://phabricator.services.mozilla.com/D74375
2020-05-13 03:56:55 +00:00
Lina Cambridge
6245c3b363 Bug 1636365 - Split out persistence from Tracker into LegacyTracker. r=markh,rfkelly
The tracker base class currently does two things: bump the score in
response to observer notifications, and store a list of changed IDs.
The bookmarks, form autofill, and now bridged trackers need to hack
around this to opt out of persistence, since they handle change
tracking in the storage layer.

This commit keeps the score logic in `Tracker`, but moves all the
persistence code into an intermediate `LegacyTracker` class, and
changes all engines that need persistence to inherit from it.

`ignoreAll` is more interesting. We want new-style stores to emit
observer notifications with change sources, so that the tracker knows
to ignore changes made by Sync. Ignoring all observer notifications
during a sync is a blunter version of this. But, not every new store
supports change sources, so we reimplement `ignoreAll` manually for
ones that don't.

Differential Revision: https://phabricator.services.mozilla.com/D74374
2020-05-13 03:56:53 +00:00
Lina Cambridge
c282dce0eb Bug 804479 - Re-enable all Sync tests on debug builds. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D74980
2020-05-12 22:10:03 +00:00
Edouard Oger
e348b78f5f Bug 1628068 p1 - Vendor viaduct crate. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D70256
2020-05-12 21:36:17 +00:00
Mark Hammond
0640090392 Bug 1637169 - Vendor new application-services. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D74817
2020-05-12 07:53:39 +00:00
Bogdan Tara
a823ee6545 Backed out 2 changesets (bug 1628068) for ViaductRequest.cpp related bustages CLOSED TREE
Backed out changeset 013a469557c1 (bug 1628068)
Backed out changeset dcda2ce7b7f9 (bug 1628068)
2020-05-12 00:44:58 +03:00
Edouard Oger
4e005845ab Bug 1628068 p1 - Vendor viaduct crate. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D70256
2020-05-11 21:01:17 +00:00
Bogdan Tara
3df4970bcc Backed out 2 changesets (bug 1628068) for ViaductRequest.cpp related bustages CLOSED TREE
Backed out changeset 928a5891c55d (bug 1628068)
Backed out changeset b6fe5d357bed (bug 1628068)
2020-05-11 23:52:47 +03:00
Edouard Oger
3dc0990bbf Bug 1628068 p1 - Vendor viaduct crate. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D70256
2020-05-11 20:19:11 +00:00
Bogdan Tara
448d53548b Backed out 2 changesets (bug 1628068) for ViaductRequest.cpp related bustages CLOSED TREE
Backed out changeset 1ea8f742ca69 (bug 1628068)
Backed out changeset 3aa2f99843e0 (bug 1628068)
2020-05-11 23:06:31 +03:00
Edouard Oger
8aebe42eda Bug 1628068 p1 - Vendor viaduct crate. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D70256
2020-05-11 19:14:21 +00:00
Ryan Kelly
c6f0e24878 Bug 1636053 - correctly include deviceID in the sync ping. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D74217
2020-05-07 10:47:24 +00:00
Ryan Kelly
8d6a18e5bf Bug 1634093 - fix intermittent shutdown failures on sync telemetry test. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D74179
2020-05-07 04:17:53 +00:00
Lina Cambridge
8caa2f7986 Bug 1634191 - Wire up Golden Gate to the new Rust extension storage interface. r=markh
This commit adds syncing support to the `StorageSyncArea` class, via
the Golden Gate library.

It also changes the `BridgedEngine` trait: `initialize` and `finalize`
haven't been useful in practice, since that's managed by the storage
service, and the `LazyStore` takes care of setting up the storage
connection on first use. But, what we do need is a way to signal a
sync is starting, so that the engine can set up temp tables. That's
handled by the new `sync_started`.

Finally, this commit changes `BridgedEngine::set_uploaded` to take a
`sync15_traits::Guid` instead of a `String`.

Differential Revision: https://phabricator.services.mozilla.com/D73415
2020-05-05 06:59:32 +00:00
Lina Cambridge
4eafc7c1a6 Bug 1634191 - Pass BSO fields along with Sync record payloads to bridged Rust engines. r=markh
This commit splits `CryptoWrapper` into a base `RawCryptoWrapper`
class, which only handles encryption and decryption without
parsing the cleartext's contents, and the existing `CryptoWrapper`
class, which works like before.

Our bridged engine subclasses `RawCryptoWrapper`, and
implements some methods to convert records to and from envelopes.
Envelopes are a concept we introduced in `sync15_traits` to pass
along metadata from the BSO wrapper (like the modified time from the
server, and ID, to ensure they match) in addition to the cleartext.
This lets us reuse `sync15_traits::Payload` to parse record payloads
in Rust, and avoids parsing the cleartext in JS, only to stringify it
again when we pass it to the bridged Rust engine.

Differential Revision: https://phabricator.services.mozilla.com/D73581
2020-05-04 22:25:00 +00:00
Lina Cambridge
7783b7bc0b Bug 1634626 - Add interrupt support for StorageSyncArea. r=markh,tcsc
This commit adds a `mozIInterruptible` implementation to
`StorageSyncArea`, and changes `LazyStore` to get an a-s interrupt
handle and interrupt pending operations.

Differential Revision: https://phabricator.services.mozilla.com/D73414
2020-05-04 21:32:52 +00:00
Lina Cambridge
a9b590300f Bug 1634626 - Refactor interruption in Golden Gate. r=markh,tcsc
This commit removes the `nsICancelable` return values from all
`mozIBridgedSyncEngine` methods, and replaces them with a
`mozIInterruptible` interface that can be implemented by store
classes that support interrupting.

The `nsICancelable` pattern was intended to make each operation
interruptible, without affecting the others. But we can't guarantee
that with SQLite, because it only has a way to interrupt all
running statements on a connection, not specific ones. Further,
this pattern doesn't match what we currently do in a-s, where we
create an internal "interrupt scope" for each operation, and hand
out an "interrupt handle" for interrupting all in-progress
operations.

Storage classes like `StorageSyncArea` can opt in to interruption
by implementing `mozIInterruptible`. It's a separate interface to
protect against accidental misuse: because it interrupts all
statements on the connection, it might lose writes if the current
operation is a `set`, for example. But it's useful for testing and
debugging, so we still expose it.

This commit also changes Golden Gate ferries to hold weak references to
the `BridgedEngine`, so that they don't block teardown.

Differential Revision: https://phabricator.services.mozilla.com/D73413
2020-05-04 21:32:29 +00:00
Mozilla Releng Treescript
b6bf8b5422 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-05-04 14:53:37 +00:00
Mark Hammond
c777f6f9ed Bug 1634257 - expose wipe_all to mozIExtensionStorageArea. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D73191
2020-04-30 08:16:26 +00:00
Stefan Hindli
49c6346195 Backed out changeset 13bb4d7dde88 (bug 1634257) for spidermoney bustages CLOSED TREE 2020-04-30 10:56:43 +03:00
Mark Hammond
baecd41165 Bug 1634257 - expose wipe_all to mozIExtensionStorageArea. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D73191
2020-04-30 07:08:38 +00:00
Ryan Kelly
7bae4ae386 Bug 1604844 - add identifiers from the sync ping to the deletion-request ping. r=markh,chutten
Differential Revision: https://phabricator.services.mozilla.com/D72286
2020-04-29 07:47:38 +00:00
Lina Cambridge
add5457732 Bug 1633943 - Support tearing down a Rust StorageSyncArea. r=markh
This commit wires up `StorageSyncArea::teardown()` to call the new
`webext_storage::Store::close()` method.

It also changes `teardown` to drop the `LazyStore`, and thus close its
database connection, on the main thread if dispatching to the task
queue fails. Dispatch should only fail at shutdown, and putting the
owned reference back only adds indirection, since the `StorageSyncArea`
will still drop its `LazyStore` later in shutdown.

Finally, it includes an xpcshell test fix for
https://github.com/mozilla/application-services/pull/3050.

Differential Revision: https://phabricator.services.mozilla.com/D72992
2020-04-29 04:35:45 +00:00
Vlad Filippov
cf50ebbe18 Bug 1631830 - Fetch Sync tokens with OAuth behind a pref r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D72092
2020-04-28 04:20:55 +00:00
Lina Cambridge
c13f9f9d49 Bug 1626128 - Change Golden Gate to depend on sync15_traits. r=markh
Now that `BridgedEngine` has been moved to `sync15_traits`, we can
remove `golden_gate_traits` from the tree, and change Golden Gate to
depend on `sync15_traits` directly.

This commit also adds a Cargo feature, `services_sync`, which reflects
the `MOZ_SERVICES_SYNC` config option. In the future, we'll use this
feature to gate implementations of `mozIBridgedSyncEngine`.

Differential Revision: https://phabricator.services.mozilla.com/D72784
2020-04-28 04:13:04 +00:00
vladikoff
de2af0a87e Bug 1627856 - Dont log URIs when sync fails to fetch favicons for synced tabs r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D70414

--HG--
extra : moz-landing-system : lando
2020-04-13 23:40:16 +00:00
Lina Cambridge
f9abd62b34 Bug 1596322 - Add XPCOM bindings for Rust Sync engines. r=markh,tcsc,LougeniaBailey
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.

Other changes include:

* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
  and moving it into the shared Sync interfaces.

The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.

Differential Revision: https://phabricator.services.mozilla.com/D65268

--HG--
extra : moz-landing-system : lando
2020-04-09 15:45:37 +00:00
Bogdan Tara
5dcf5dcc85 Backed out changeset d8ef791a2165 (bug 1596322) for browser_all_files_referenced.js failures CLOSED TREE 2020-04-09 13:17:04 +03:00
Lina Cambridge
fcb1f70a45 Bug 1596322 - Add XPCOM bindings for Rust Sync engines. r=markh,tcsc,LougeniaBailey
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.

Other changes include:

* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
  and moving it into the shared Sync interfaces.

The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.

Differential Revision: https://phabricator.services.mozilla.com/D65268

--HG--
extra : moz-landing-system : lando
2020-04-09 07:32:52 +00:00
Brindusan Cristian
bb29753b0d Backed out changeset 2b02e71f1780 (bug 1596322) for multiple xpcshell failures. CLOSED TREE 2020-04-09 03:39:56 +03:00
Lina Cambridge
186b7665c4 Bug 1596322 - Add XPCOM bindings for Rust Sync engines. r=markh,tcsc,LougeniaBailey
This commit adds a new crate for bridging Rust Sync engines to Desktop,
and a `mozIBridgedSyncEngine` for accessing the bridge via JS.
Naturally, the bridge is called Golden Gate. 😊 For more information
on how to use it, please see `golden_gate/src/lib.rs`.

Other changes include:

* Ensuring the test Sync server uses UTF-8 for requests and responses.
* Renaming `mozISyncedBookmarksMirrorLogger` to `mozIServicesLogger`,
  and moving it into the shared Sync interfaces.

The `BridgedEngine` trait lives in its own crate, called
`golden_gate_traits`, to make it easier to eventually move into a-s.
`Interruptee` and `Interrupted` already exist in a-s, and are
duplicated in this crate for now.

Differential Revision: https://phabricator.services.mozilla.com/D65268

--HG--
extra : moz-landing-system : lando
2020-04-08 20:18:37 +00:00
Cosmin Sabou
84ff986617 Merge mozilla-central to autoland. CLOSED TREE 2020-04-07 00:59:27 +03:00
Mozilla Releng Treescript
a17ce3b6b4 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-04-06 14:28:50 +00:00
sonakshi
c2aaee8a41 Bug 1584797 - Remove unused aProxyService parameter from applyFilter method r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D69679

--HG--
extra : moz-landing-system : lando
2020-04-06 20:21:03 +00:00
aarushivij
338bc99a4f Bug 1573758 - Extend TTL for syncing tabs to 1 year. r=markh
Differential Revision: https://phabricator.services.mozilla.com/D69278

--HG--
extra : moz-landing-system : lando
2020-04-02 00:25:42 +00:00
Sam Foster
2db8ec19f5 Bug 1622514 - Move OSKeyStore.jsm into toolkit/modules. r=jaws
Differential Revision: https://phabricator.services.mozilla.com/D68133

--HG--
rename : browser/modules/OSKeyStore.jsm => toolkit/modules/OSKeyStore.jsm
rename : browser/modules/test/OSKeyStoreTestUtils.jsm => toolkit/modules/tests/modules/OSKeyStoreTestUtils.jsm
rename : browser/modules/test/unit/test_osKeyStore.js => toolkit/modules/tests/xpcshell/test_osKeyStore.js
extra : moz-landing-system : lando
2020-03-25 08:21:24 +00:00
Sylvestre Ledru
200b20eb5c Bug 1622328 - fxa_utils.js: Add the license r=markh
Differential Revision: https://phabricator.services.mozilla.com/D66831

--HG--
extra : moz-landing-system : lando
2020-03-14 01:09:01 +00:00
Thom Chiovoloni
0b02e4870b Bug 1621806 - Reduce frequency of client-side extension-storage syncs. r=markh
Reduce frequency of client-side extension-storage syncs

Differential Revision: https://phabricator.services.mozilla.com/D66650

--HG--
extra : moz-landing-system : lando
2020-03-17 19:36:58 +00:00