Граф коммитов

6157 Коммитов

Автор SHA1 Сообщение Дата
Csoregi Natalia aec20399f5 Backed out changeset a0af6d53c082 (bug 1639284) for multiple failures e.g. browser_asrouter_whatsnewpanel.js CLOSED TREE 2020-06-22 12:20:39 +03:00
Mathieu Leplatre 07af99c7f1 Bug 1639284 - Store records, timestamp and metadata in one IndexedDB transaction r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78246
2020-06-22 08:21:40 +00:00
Mark Hammond fdf9770703 Bug 1639781 - record a new 'streamID' guid in sync-tab telemetry. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D80148
2020-06-19 02:23:58 +00:00
Mathieu Leplatre f446e2ad19 Bug 1646315 - Prevent concurrent load of JSON dump with .get() r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D80162
2020-06-18 09:56:46 +00:00
Cosmin Sabou 17e54eff48 Backed out changeset 7e39d1eed06b (bug 1639284) for xpcshell failures on test_blocklist_severities.js. CLOSED TREE 2020-06-18 17:29:29 +03:00
Mathieu Leplatre 986bc3704b Bug 1639284 - Store records, timestamp and metadata in one IndexedDB transaction r=Gijs,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78246
2020-06-18 09:47:43 +00:00
Mark Hammond 1bb6fb83cf Bug 1644598 - record/extend telemetry about the push state of FxA devices. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D79784
2020-06-18 08:29:09 +00:00
Mihai Alexandru Michis cce0439cc1 Backed out changeset da7cbff78183 (bug 1639284) for causing failures in test_engine_selector_remote_settings.js
CLOSED TREE
2020-06-17 20:51:02 +03:00
Mathieu Leplatre a4d248daf8 Bug 1639284 - Store records, timestamp and metadata in one IndexedDB transaction r=Gijs,extension-reviewers,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78246
2020-06-17 15:58:25 +00:00
Vlad Filippov 9aacb4c755 Bug 1645834 - Don't keep trying to send tabs if the server has rate-limited us. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D79774
2020-06-16 14:35:15 +00:00
Mark Hammond a04a30cd9c Bug 1645742 - ensure FxA has a push subscription as well as whether it has expired. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D79783
2020-06-16 05:53:45 +00:00
Vlad Filippov ee97e91066 Bug 1637163 - Redact details in WebChannel errors. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D79563
2020-06-15 15:03:59 +00:00
ffxbld ec8c8c7bde No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D79691
2020-06-15 14:33:28 +00:00
Rob Wu 206ca19c33 Bug 1645598 - Vendor application-services for fix in webext-storage r=lina
To get this fix: https://github.com/mozilla/application-services/pull/3235

Updated as follows:

```
sed -i 's/e8d7530319fa6c20d9de78d031c9398630eca3cd/61dcc364ac0d6d0816ab88a494bbf20d824b009b/g' services/fxaccounts/rust-bridge/firefox-accounts-bridge/Cargo.toml services/sync/golden_gate/Cargo.toml toolkit/components/extensions/storage/webext_storage_bridge/Cargo.toml toolkit/components/glean/Cargo.toml toolkit/library/rust/shared/Cargo.toml
./mach vendor rust
```

Verified by running the new regression test that I added in the bug:

```
./mach test toolkit/components/extensions/test/xpcshell/test_ext_storage_{local,sync,sync_kinto}.js
```

Differential Revision: https://phabricator.services.mozilla.com/D79628
2020-06-15 12:56:58 +00:00
Mark Hammond 0278934973 Bug 1645729 - avoid printing a warning to the console about a log level's preference. r=rfkelly
Specifically:
> Log warning: The log 'Services.Common.RESTRequest' is configured to use the preference 'services.common.log.logger.rest.request' - you must adjust the level by setting this preference, not by using the level setter

This is because the hawkrequest module attempts to explicitly set the level
from the preference value, but these days Log.jsm manages that itself.

Also skips obtaining the log itself until it's needed, as it almost never
actually is.

Differential Revision: https://phabricator.services.mozilla.com/D79633
2020-06-15 04:51:02 +00:00
Mathieu Leplatre 4de2f47682 Bug 1644153 - Fix loading of JSON dump from main-preview r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D79016
2020-06-11 17:39:23 +00:00
ffxbld e1defa0ff0 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D79301
2020-06-11 14:17:03 +00:00
Thom Chiovoloni b3cbb2b28e Bug 1629127 - Add sync telemetry for storage.sync migration r=lina,extension-reviewers,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78573
2020-06-10 22:29:02 +00:00
Thom Chiovoloni 9bea145029 Bug 1629116 - Ensure the sync engine we want telemetry from is actually registered in tests. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D78720
2020-06-08 18:57:59 +00:00
Lina Cambridge 6744c50972 Bug 1643804 - Always resolve the promise if fetching extension storage observer notifications fails. r=tcsc
Differential Revision: https://phabricator.services.mozilla.com/D78571
2020-06-05 20:38:42 +00:00
Thom Chiovoloni d76d4f4c46 Bug 1629116 - Add an overrideTelemetryName to bridged extension storage. r=markh
Add an overrideTelemetryName to bridged extension storage.

Differential Revision: https://phabricator.services.mozilla.com/D78413
2020-06-05 01:10:10 +00:00
Mathieu Leplatre 337e076cae Bug 1641939 - Flush local DB after retrying r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D78177
2020-06-04 14:16:01 +00:00
ffxbld 765a9c9ca1 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D78285
2020-06-04 14:13:36 +00:00
Mathieu Leplatre 51c76bb2b8 Bug 1640136 - Load main dump when using preview r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D77786
2020-06-04 09:00:31 +00:00
Mark Hammond 350c376c1a Bug 1634615 - flip the pref to enable the rust browser.storage.sync implementation. r=lina,mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D78171
2020-06-04 06:11:45 +00:00
Dorel Luca 6193cd2270 Backed out changeset b8a2744a115f (bug 1640136) for XPCShell test/unit/test_remote_settings_worker.js. CLOSED TREE 2020-06-04 04:56:10 +03:00
Mathieu Leplatre cc4e7f5130 Bug 1640136 - Load main dump when using preview r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D77786
2020-06-03 14:56:04 +00:00
Dorel Luca 61e47c120c Merge mozilla-cental to autoland. CLOSED TREE 2020-06-01 19:35:58 +03:00
Dorel Luca d6cb4941f9 Merge autoland to mozilla-central. a=merge 2020-06-01 19:20:20 +03:00
Mozilla Releng Treescript a56e4bfdd7 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2020-06-01 10:15:55 +00:00
Mark Hammond 6abadd577b Bug 1639449 - Vendor new application-services to expose kinto migration and sync change notifications. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76092
2020-05-30 02:44:07 +00:00
Mark Banner 29c4237245 Bug 1635523 - Remove now unused twitter files and pull in latest config. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D76909
2020-05-29 20:17:57 +00:00
Lina Cambridge 6ac44b30e0 Bug 1641005 - Implement `mozISyncedExtensionStorageArea.fetchPendingSyncChanges()`. r=markh
This new method fetches pending synced changes from the extension
storage store, and passes them to `storage.onChanged` listeners.
This allows extensions that listen for these events to know when a
sync happened, which Kinto supported as well.

To guard against misuse, this method is implemented on a separate
`mozISyncedExtensionStorageArea` interface. To avoid multiple
inheritance (if `mozI{Synced, Configurable}ExtensionStorageArea` both
inherited from `mozIExtensionStorageArea`, which base method is called
when?), both of these internal-ish interfaces now inherit from
`nsISupports` instead.

Finally, because `fetchPendingSyncChanges` can return changes for
multiple extensions, `mozIExtensionStorageListener.onChanged` now takes
the affected extension ID as its first argument.

Differential Revision: https://phabricator.services.mozilla.com/D76976
2020-06-01 06:07:51 +00:00
Bogdan Tara 9d4bc1415b Backed out changeset d6c79e77d6b9 (bug 1641005) for test_StorageSyncService.js failures CLOSED TREE 2020-06-01 04:32:34 +03:00
Lina Cambridge d52843b372 Bug 1641005 - Implement `mozISyncedExtensionStorageArea.fetchPendingSyncChanges()`. r=markh
This new method fetches pending synced changes from the extension
storage store, and passes them to `storage.onChanged` listeners.
This allows extensions that listen for these events to know when a
sync happened, which Kinto supported as well.

To guard against misuse, this method is implemented on a separate
`mozISyncedExtensionStorageArea` interface. To avoid multiple
inheritance (if `mozI{Synced, Configurable}ExtensionStorageArea` both
inherited from `mozIExtensionStorageArea`, which base method is called
when?), both of these internal-ish interfaces now inherit from
`nsISupports` instead.

Finally, because `fetchPendingSyncChanges` can return changes for
multiple extensions, `mozIExtensionStorageListener.onChanged` now takes
the affected extension ID as its first argument.

Differential Revision: https://phabricator.services.mozilla.com/D76976
2020-06-01 00:54:27 +00:00
ffxbld 12faf95015 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D77670
2020-06-01 14:16:14 +00:00
Mathieu Leplatre 1cfe96cf26 Bug 1640023 - Sync on .get() when no metadata r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D77233
2020-05-28 16:02:03 +00:00
Mark Hammond 35a92088a5 Bug 1640791 - Expose allowSkippedRecord to a bridged engine and enable it for extension-storage. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76785
2020-05-27 02:12:53 +00:00
Rob Wu e7258ec672 Bug 1640291 - Account for last_modified in attachment downloader r=leplatrem
Differential Revision: https://phabricator.services.mozilla.com/D76963
2020-05-27 11:28:27 +00:00
Rob Wu 0ceb5a55a2 Bug 1640291 - Read RemoteSettings dump before cache, and minimize unnecessary reads r=leplatrem
This commit does the following:

- Feature / Optimization: Check the dump before the cache, instead of
  the reverse. The dump is expected to match the requested attachment in
  the common case, and checking it first helps with ensuring that the
  expected (packaged dump) is used when available.

- Optimization: Defer reading the cached attachment until it's needed.

- Refactor / Feature: Treat a missing `.meta.json` file as a sign that
  the attachment dump does not exist, rather than an error.
  Previously, if an attachment cannot be downloaded from the network,
  that error would be replaced with a generic `DownloadError` (from the
  missing `.meta.json` file). This is mostly relevant for telemetry.

- Refactor / Maintainability: Create helper to manage lazy access to the
  record and attachment, to ensure that the record and attachment is
  only read on demand, and at most once.

- Refactor / Readability: Move the common return value generation logic
  to the helper as `getResult`, to avoid the verbose duplication of the
  logic. Now the return value fits in one line instead of 5-6 lines.

- Fix test: Rename filename-of-dump.meta.json and fix test expectation
  to ensure that the test checks the absence of the file content,
  rather than the absence of the meta data file.

Differential Revision: https://phabricator.services.mozilla.com/D76962
2020-05-27 08:00:43 +00:00
Rob Wu e609ad7d6f Bug 1640291 - Add test coverage for corrupted cache r=leplatrem
In practice, the cache of the attachment downloader can become corrupt
and unusable when IndexedDB breaks. The implementation correctly handled
this case, but there were no tests that verified that it did.

This patch adds test coverage for the scenario of a broken cache,
to ensure that the implementation continues to behave in a sane way.

Differential Revision: https://phabricator.services.mozilla.com/D76961
2020-05-27 07:50:12 +00:00
Rob Wu 680ed7bd7e Bug 1640292 - Move RemoteSettingsWorker.checkContentHash to main thread r=leplatrem
The crypto API does most of its work on the background thread. There is
no benefit in posting the buffer to a worker thread.

Differential Revision: https://phabricator.services.mozilla.com/D76960
2020-05-27 13:54:37 +00:00
Ryan Kelly bc3600def8 Bug 1640765 - only build the rust fxa-client crate on Nightly. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76771
2020-05-27 05:51:39 +00:00
Bogdan Tara 15858ad28e Backed out changeset 0d3f76ede294 (bug 1640765) for rust related bustage CLOSED TREE 2020-05-27 07:06:35 +03:00
Ryan Kelly 58ccfb0fe7 Bug 1640765 - only build the rust fxa-client crate on Nightly. r=lina
Differential Revision: https://phabricator.services.mozilla.com/D76771
2020-05-27 03:22:15 +00:00
Mark Banner ceba0e848d Bug 1635235 - Implement reading the allow override default search engine allowlist from remote settings. r=daleharvey
This implements reading the list from remote settings. We only read it at startup if necessary, or on add-on installation.

We do not check for updates - if something is removed, we'll wait until next startup before processing it.

Also adds lots of tests for canOverride as this seems a critical part to get right.

Differential Revision: https://phabricator.services.mozilla.com/D76473
2020-05-26 19:40:42 +00:00
ffxbld b3c5906f23 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D76710
2020-05-26 14:53:18 +00:00
Mathieu Leplatre 97875bccdd Bug 1637178 - Distinguish local DB hijacks from sign errors in Uptake Telemetry r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75529
2020-05-26 11:20:03 +00:00
Mihai Alexandru Michis 33899422e7 Backed out 2 changesets (bug 1635235, bug 1635239) for causing Bug 1640583.
CLOSED TREE

Backed out changeset 97ecda13df18 (bug 1635239)
Backed out changeset c9f80397bbec (bug 1635235)
2020-05-25 16:43:03 +03:00
Lina Cambridge 53047a8297 Bug 1640528 - Allow extension storage to be enabled and disabled independently of add-ons. r=markh
By default, toggling the add-ons engine also toggles extension storage.
However, it's also possible to enable extension storage without add-ons
by setting an override pref. If the override pref is set, we'll treat
extension storage as an engine that can be toggled independently. If
it's not set, we'll ignore attempts to toggle the engine separately.

Differential Revision: https://phabricator.services.mozilla.com/D76635
2020-05-25 01:12:16 +00:00
Mark Banner 019b662f87 Bug 1635235 - Implement reading the allow override default search engine allowlist from remote settings. r=daleharvey
This implements reading the list from remote settings. We only read it at startup if necessary, or on add-on installation.

We do not check for updates - if something is removed, we'll wait until next startup before processing it.

Also adds lots of tests for canOverride as this seems a critical part to get right.

Differential Revision: https://phabricator.services.mozilla.com/D76473
2020-05-24 21:45:41 +00:00
Rob Wu 8c4c5239e9 Bug 1636158 - Document how to use attachment dumps in RemoteSettings r=leplatrem
Differential Revision: https://phabricator.services.mozilla.com/D76159
2020-05-22 13:09:50 +00:00
Mathieu Leplatre b25d0ae2e5 Bug 1639224 - Verify signature if local timestamp is in the future r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D76249
2020-05-22 00:27:06 +00:00
Mathieu Leplatre 8965849d47 Bug 1639684 - Report server_error on HTTP 5XX when polling for changes r=rdalal
Differential Revision: https://phabricator.services.mozilla.com/D76242
2020-05-21 23:59:58 +00:00
Lina Cambridge 400ff2f682 Bug 1639942 - Correctly register `Extension-Storage` engine alternatives. r=tcsc
Alternative engines are registered using the lowercased version of
the keys in the modules object. But `extension-storage` is hyphenated,
so we need to use `Extension-Storage` (not `ExtensionStorage`) as the
key name, to match the name of the engine and its collection.

Without the hyphen, we'll register the alternative as
`extensionstorage`, so it'll never be used because everything else
expects the engine to be called `extension-storage`.

Differential Revision: https://phabricator.services.mozilla.com/D76355
2020-05-21 18:55:37 +00:00
Sid Stamm 56c4be9954 Bug 1002724 - use resolvable URL in fxaccounts browser chrome tests. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75086
2020-05-21 17:33:32 +00:00
ffxbld 663946fddd No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D76324
2020-05-21 14:05:50 +00:00
Lina Cambridge efbc79edbd Bug 1639727 - Fix `trackRemainingChanges` in the tabs and prefs Sync engines. r=markh
This commit fixes two issues: moves `trackRemainingChanges` to the
engine, since that's where it defined (not on the store), and skips
setting `modified` if all records have been successfully uploaded.

Differential Revision: https://phabricator.services.mozilla.com/D76270
2020-05-21 07:13:12 +00:00
Vlad Filippov de6e0f725b Bug 1632557 - Add pref and logic for direct use of session tokens to provision OAuth tokens r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75204
2020-05-20 22:06:35 +00:00
Lina Cambridge faf2fd15e4 Bug 1639018 - Change `TaskRunnable::dispatch` to take owned runnables. r=froydnj
This matches how the `Dispatch(already_AddRefed<nsIRunnable>)`
overloads work in C++: `Dispatch` takes ownership of the runnable, and
leaks it if dispatch fails—because the thread manager is shutting down,
for instance. This avoids a race where a runnable can be released on
either the owning or target thread.

Rust doesn't allow arbitrary `Self` types yet (see
rust-lang/rust#44874), so we need to change `dispatch` and
`dispatch_with_options` to be associated methods.

Differential Revision: https://phabricator.services.mozilla.com/D75858
2020-05-20 20:54:49 +00:00
Florian Quèze 3449d19a7e Bug 1637637 - disable fast shutdown for the test_prefs_store.js and test_prefs_tracker.js tests where it crashes, r=gbrown.
Depends on D72407

Differential Revision: https://phabricator.services.mozilla.com/D76167
2020-05-20 16:35:51 +00:00
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
Noemi Erli c1cca03e21 Backed out 6 changesets (bug 1002724) for failing in browser_fall_back_to_https.js CLOSED TREE
Backed out changeset e487b4cd9223 (bug 1002724)
Backed out changeset 37473a8ba1fd (bug 1002724)
Backed out changeset e868f1e0af0e (bug 1002724)
Backed out changeset 1c57f8717b15 (bug 1002724)
Backed out changeset 782808a05ff8 (bug 1002724)
Backed out changeset c60c48d170e1 (bug 1002724)
2020-05-18 19:22:19 +03:00
Sid Stamm b45bfd711c Bug 1002724 - use resolvable URL in fxaccounts browser chrome tests. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75086
2020-05-18 15:08:45 +00:00
Csoregi Natalia 179b0c82b2 Backed out 6 changesets (bug 1002724) for bustage on nsDocShell.cpp. CLOSED TREE
Backed out changeset 56ba616e2644 (bug 1002724)
Backed out changeset d481cf074d3b (bug 1002724)
Backed out changeset da26540ecee5 (bug 1002724)
Backed out changeset 01cbf611158a (bug 1002724)
Backed out changeset b60ba645f1f4 (bug 1002724)
Backed out changeset 4ebad0d2ca0a (bug 1002724)
2020-05-18 16:06:55 +03:00
Sid Stamm 7697eda5ae Bug 1002724 - use resolvable URL in fxaccounts browser chrome tests. r=rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D75086
2020-05-15 18:42:15 +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
ffxbld 9f539b6b93 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D75307
2020-05-14 14:04:23 +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 Banner 6212949ff5 Bug 1634562 - Fix default engines for okru and mailru distributions in certain regions. r=daleharvey
Yandex is default in these regions, so for okru-001 and mailru-001 we just turn that off.

Differential Revision: https://phabricator.services.mozilla.com/D73948
2020-05-12 16:42:58 +00:00
Mark Banner 9edd298c88 Bug 1635056 - Fix and prevent duplicate parameters in search queries for distribution engines. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D73937
2020-05-12 16:42:58 +00:00
Mark Banner 0750ee867a Bug 1630980 - Add more tests for search engine distributions in different locales and fix yandex.ua inclusion. r=daleharvey,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D72951
2020-05-12 16:42:40 +00:00
Mark Banner 6a4cc10797 Bug 1630980 - Add orders for distribution engines. r=daleharvey,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D72950
2020-05-12 16:42:18 +00:00
Mark Banner abc975a9ac Bug 1630980 - Remove orders for current engines, let them be alphabetical. r=daleharvey,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D72949
2020-05-12 16:42:10 +00:00
Mark Banner 71c4b59978 Bug 1630980 - Add default engine information for distribution engines to the modern search configuration. r=daleharvey,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D72948
2020-05-12 16:42:08 +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
Cosmin Sabou b51ad59f7d Backed out changeset 8f97a01a0a84 (bug 1543697) for causing bc failures on FxAccountsConfig.jsm. CLOSED TREE 2020-05-11 21:29:49 +03:00
ffxbld f78dade689 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D74713
2020-05-11 17:44:03 +00:00
Vijay Budhram 3485e6263e Bug 1543697 - Fix FxAccounts.config manage device promises r=eoger,rfkelly
Differential Revision: https://phabricator.services.mozilla.com/D27279
2020-05-11 17:05:32 +00:00
Gijs Kruitbosch b46afee956 Bug 1636256 - abort importJSONDump tasks in the remote settings worker at shutdown, r=leplatrem,asuth
To use a single transaction for `importJSONDump`, this commit:

- changes IDBHelpers' `executeIDB` method to take either a string or array
  pointing to `objectStore`s that the caller wants to use.
- uses that from RemoteSettingsWorker to start a single transaction using both
  the `records` and the `timestamps` store
- updates `bulkOperationHelper` to take an optional `completion` callback, in
  addition to the rejection callback, to be called when all the bulk
  operations are complete
- uses that optional argument from RemoteSettingsWorker's `importDumpIDB`
  (the actual implementation of IDB access from `importJSONDump`) to first
  bulk-import the actual records, and then update the timestamp stored for
  that remote settings collection.

Then to abort that single transaction, this commit:
- stores pending transactions in a set, similar to what Database.jsm already
  does, and removes items from that set when the `promise` from `executeIDB`
  either resolves or rejects.
- adds a `prepareShutdown` action on the RemoteSettingsWorker's `Agent` class,
  to be called by the jsm side of the worker manager when shutdown happens.
  When called, it iterates over the pending transactions and aborts all of
  them.
  This also sets a `gShutdown` flag.
- ensures that where code `await`s in the middle of an operation, it stops
  (throws) immediately if `gShutdown` has been set.
- adds a test to test_shutdown_handling.js to verify that this mechanism now
  stops pending import tasks in the worker.


Finally, as a driveby, fixes an oversight in test_remote_settings_worker.js
where the second `.get()` call wasn't actually testing whether the
`importJSONDump` call in the worker had succeeded, because if the collection
was empty it would do the import itself, which I realized when I used similar
code in the shutdown test...

Differential Revision: https://phabricator.services.mozilla.com/D74315
2020-05-11 12:53:23 +00:00
Andrea Marchesini 3321630999 Bug 1632187 - Introduce nsICookieService::setCookieStringFromDocument - part 3 - remove nsICookieService::setCookieString from tests, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D71976
2020-05-09 22:28:53 +00:00
Coroiu Cristina b2935aef35 Backed out 5 changesets (bug 1632187) for xpcshell failures at netwerk/test/unit/test_proxyconnect.js
Backed out changeset c0e6dad41b74 (bug 1632187)
Backed out changeset 328ee0899987 (bug 1632187)
Backed out changeset cb775f75ff1f (bug 1632187)
Backed out changeset de6907618ac9 (bug 1632187)
Backed out changeset 1070e843071c (bug 1632187)
2020-05-09 23:22:06 +03:00
Andrea Marchesini 275ef67da0 Bug 1632187 - Introduce nsICookieService::setCookieStringFromDocument - part 3 - remove nsICookieService::setCookieString from tests, r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D71976
2020-05-09 19:03:12 +00:00
Dorel Luca a6ee570e1a Reverting changes in 43625f3bc860260d31f6332b2f0b30d32de8629b services/settings/dumps/blocklists/addons-bloomfilters.json for casuing xpcshell failures. CLOSED TREE 2020-05-07 18:14:12 +03:00
ffxbld bed945fee6 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D74235
2020-05-07 14:10:06 +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
Gijs Kruitbosch 39d7245017 Bug 1635408 - abort non-critical RemoteSettingsWorker tasks at shutdown, r=leplatrem
Differential Revision: https://phabricator.services.mozilla.com/D73858
2020-05-05 23:52:17 +00:00
Ian Moody 011b59d595 Bug 1536556 - Replace raw thrown Cr.ERRORs with Components.Exception. r=mossop,remote-protocol-reviewers,marionette-reviewers,whimboo,necko-reviewers,geckoview-reviewers,valentin,agi
Raw Cr.ERROR don't get stack information, same as throwing JS literals instead
of `new Error()`s.

This was done automatically with a new eslint rule that will be introduced in
the next commit.  One instance of a raw Cr.ERROR was not replaced since it is
used in a test that specifically checks the preservation of raw Cr values in
XPCJS.  The rule will be disabled for that instance.

Differential Revision: https://phabricator.services.mozilla.com/D28073
2020-05-05 17:41:36 +00:00
Mathieu Leplatre d8ca686abd Bug 1635387 - Remove metadata entries on clear and improve logging r=glasserc
Differential Revision: https://phabricator.services.mozilla.com/D73815
2020-05-05 14:14:47 +00:00
Razvan Maries ad08b5fdea Backed out changeset 819c1fb3e554 (bug 1635408) for xpcshell perma failures on test_shutdown_handling.js. CLOSED TREE 2020-05-05 18:07:39 +03:00
Gijs Kruitbosch a86079205b Bug 1635408 - abort non-critical RemoteSettingsWorker tasks at shutdown, r=leplatrem
Differential Revision: https://phabricator.services.mozilla.com/D73858
2020-05-05 14:01:28 +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
Ryan Kelly ccc520aafb Bug 1632734 - refactor FxAccounts.device public methods to use `withCurrentAccountState`. r=eoger,markh
Differential Revision: https://phabricator.services.mozilla.com/D73011
2020-05-04 02:48:20 +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
Mihai Alexandru Michis 6c70d124b5 Merge mozilla-central to autoland. a=merge 2020-05-04 18:52:51 +03: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
ffxbld 960049edf3 No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D73699
2020-05-04 14:03:46 +00:00
Rob Wu f7f88112a2 Bug 1634671 - Add RS dump of addons-bloomfilters blocklist to Android r=agi
These support the new implementation of the addon blocklist (bug 1620621),
which is a more space-efficient way to represent the blocklist.

A comparison of file size was given in D73159. In short, 913KB for the
old JSON-based blocklist (addons.json), 64KB for the new one.

In practice, addons.json is 273KB compressed.

The new blocklist (addons-mlbf.bin) does not compress that well since it
is already an efficiently packed binary format.

Differential Revision: https://phabricator.services.mozilla.com/D73438
2020-05-01 19:36:43 +00:00
Rob Wu ed0c57f641 Bug 1634203 - Replace Kinto client with RemoteSettings client in test_remote_settings_poll r=glasserc
Differential Revision: https://phabricator.services.mozilla.com/D73321
2020-04-30 19:52:14 +00:00
ffxbld 39ea1433df No Bug, mozilla-central repo-update HSTS HPKP remote-settings - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D73270
2020-04-30 14:02:58 +00:00
Mathieu Leplatre 8e59cea76e Bug 1634058 - Honor load_dump pref with .get() r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D73229
2020-04-30 13:40:24 +00:00
Rob Wu 1d005914a3 Bug 1620621 - Temporarily disable test_remote_settings_poll.js r=glasserc
This test uses the Kinto client to access the RemoteSettings database.
However, due to the database version bump from D72416, the kinto client
is no longer compatible with the RemoteSettings database.

This will be fixed in bug 1634203.

Differential Revision: https://phabricator.services.mozilla.com/D73160
2020-04-30 10:02:44 +00:00
Rob Wu 6c21ed0e5d Bug 1620621 - Add initial dump of addons blocklist r=Gijs
The MLBF (addons-mlbf.bin) itself is 64 KB.
Together with the metadata, this is 65 KB.
In contrast, the current JSON-based dump (addons.json) is 913 KB.

Differential Revision: https://phabricator.services.mozilla.com/D73159
2020-04-30 10:02:41 +00:00
Rob Wu 981457a895 Bug 1620621 - Add support for fallback to dumps for attachments r=Gijs,leplatrem
With this piece, it is now possible for RemoteSettings clients to always
have a valid attachment.

This adds the client APIs that could support bug 1542177.

Differential Revision: https://phabricator.services.mozilla.com/D72417
2020-04-30 10:02:30 +00:00
Rob Wu f08ef10b92 Bug 1620621 - Add caching and recovery mechanisms to RemoteSettings's download() method r=Gijs,leplatrem
The current RemoteSettings API has two methods for downloading:

- `download(record)` to download an attachment to disk, with a filename
  given by the record. The file is read and returned before downloading.
  A new download attempt overwrites the file, with no recovery mechanism
  if the download fails.
- `downloadAsBytes(record)` to download an attachment in memory.

The `download` method does have a cache, but it is only useful for
reducing bandwidth usage, not for availability of data. Moreover, if its
associated record is removed from the collection, then callers do not
have a way to delete the file since its identifier (filename) originates
from the record.

The `downloadAsBytes` method does not have this file tracking issue
since it does not persist the data, but it forces callers to implement
their own attachment storing mechanism.

This commit adds the `useCache` option to the `download()` method to
enable callers to use an IndexedDB-based cache instead of the
filesystem. The following options unlock significant features:

- `fallbackToCache` - If the requested attachment is not available, the
  last known attachment is returned.
- `fallbackToDump` - If the requested attachment is not available, nor
  cached, then the attachment (dump) that is packaged with the client is
  returned instead. This is implemented in the next commit (D72417).

The original record is cached along with the attachment, to allow
callers to use the file (identified by the given `attachmentId`) and
its metadata, even when the original record has been removed from the
collection.

This is particularly useful for scenarios where one wants to keep a file
(and metadata) up to date via RemoteSettings, without having to develop
a separate storage and synchronization mechanism.

The deprecation of the old behavior will be handled in bug 1634127.

Differential Revision: https://phabricator.services.mozilla.com/D72416
2020-04-30 10:02:27 +00:00
Razvan Maries c92da124b3 Backed out 8 changesets (bug 1620621) for build bustages. CLOSED TREE
Backed out changeset 14a57e32c414 (bug 1620621)
Backed out changeset 56b2b19a9bc1 (bug 1620621)
Backed out changeset 6df42b7528ec (bug 1620621)
Backed out changeset c23703684254 (bug 1620621)
Backed out changeset 206ad824e1bc (bug 1620621)
Backed out changeset e0f3e057b311 (bug 1620621)
Backed out changeset 12817823a3c9 (bug 1620621)
Backed out changeset 80dcb089ce8e (bug 1620621)
2020-04-30 12:29:30 +03:00
Rob Wu 6b89689536 Bug 1620621 - Temporarily disable test_remote_settings_poll.js r=glasserc
This test uses the Kinto client to access the RemoteSettings database.
However, due to the database version bump from D72416, the kinto client
is no longer compatible with the RemoteSettings database.

This will be fixed in bug 1634203.

Differential Revision: https://phabricator.services.mozilla.com/D73160
2020-04-30 09:08:14 +00:00
Rob Wu 6986e261ef Bug 1620621 - Add initial dump of addons blocklist r=Gijs
The MLBF (addons-mlbf.bin) itself is 64 KB.
Together with the metadata, this is 65 KB.
In contrast, the current JSON-based dump (addons.json) is 913 KB.

Differential Revision: https://phabricator.services.mozilla.com/D73159
2020-04-30 02:48:46 +00:00
Rob Wu 4c8480260e Bug 1620621 - Add support for fallback to dumps for attachments r=Gijs,leplatrem
With this piece, it is now possible for RemoteSettings clients to always
have a valid attachment.

This adds the client APIs that could support bug 1542177.

Differential Revision: https://phabricator.services.mozilla.com/D72417
2020-04-30 02:48:37 +00:00
Rob Wu e515fb95e2 Bug 1620621 - Add caching and recovery mechanisms to RemoteSettings's download() method r=Gijs,leplatrem
The current RemoteSettings API has two methods for downloading:

- `download(record)` to download an attachment to disk, with a filename
  given by the record. The file is read and returned before downloading.
  A new download attempt overwrites the file, with no recovery mechanism
  if the download fails.
- `downloadAsBytes(record)` to download an attachment in memory.

The `download` method does have a cache, but it is only useful for
reducing bandwidth usage, not for availability of data. Moreover, if its
associated record is removed from the collection, then callers do not
have a way to delete the file since its identifier (filename) originates
from the record.

The `downloadAsBytes` method does not have this file tracking issue
since it does not persist the data, but it forces callers to implement
their own attachment storing mechanism.

This commit adds the `useCache` option to the `download()` method to
enable callers to use an IndexedDB-based cache instead of the
filesystem. The following options unlock significant features:

- `fallbackToCache` - If the requested attachment is not available, the
  last known attachment is returned.
- `fallbackToDump` - If the requested attachment is not available, nor
  cached, then the attachment (dump) that is packaged with the client is
  returned instead. This is implemented in the next commit (D72417).

The original record is cached along with the attachment, to allow
callers to use the file (identified by the given `attachmentId`) and
its metadata, even when the original record has been removed from the
collection.

This is particularly useful for scenarios where one wants to keep a file
(and metadata) up to date via RemoteSettings, without having to develop
a separate storage and synchronization mechanism.

The deprecation of the old behavior will be handled in bug 1634127.

Differential Revision: https://phabricator.services.mozilla.com/D72416
2020-04-30 09:02:14 +00:00
Gijs Kruitbosch f6364a8a1b Bug 1630766 - use Remote Settings instead of kinto-offline-client for remote_settings_worker sanity checks, r=leplatrem
Depends on D72063

Differential Revision: https://phabricator.services.mozilla.com/D72064
2020-04-30 08:23:36 +00:00
Gijs Kruitbosch 6a1f88f746 Bug 1630766 - optimize clear() in remote settings' Database.jsm to delete based on a keyrange instead of cursor'ing through everything, r=asuth
Depends on D71326

Differential Revision: https://phabricator.services.mozilla.com/D72063
2020-04-29 22:57:18 +00:00
Gijs Kruitbosch ca9538bd16 Bug 1630766 - handle abort events in Remote Settings' executeIDB and test that this works, r=asuth,leplatrem
This adds abort handlers to Database.jsm and RemoteSettingsWorker.js's
indexedDB transactions, so we handle transaction aborts appropriately
and do not leave consumers waiting forever.

It also adds explicit error passing to places where we continue operating on a
store via a live transaction after control flow passes back to executeIDB,
because we use the `onsuccess` handler of earlier IDBRequests to run more
requests in the transaction.

In this case, in theory exceptions get handled by IndexedDB by invoking the
abort handler on the transaction (which we do not have right now...), but as a
belt-and-braces approach, it's probably better to do this explicitly.

Differential Revision: https://phabricator.services.mozilla.com/D71326
2020-04-30 08:17:54 +00:00
Mathieu Leplatre 77fd51daf1 Bug 1633502 - Fix usage of timestamp in changeset querystring r=mythmon
Differential Revision: https://phabricator.services.mozilla.com/D73133
2020-04-29 20:49:27 +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
Dorel Luca 58186c88dc Backed out 8 changesets (bug 1620621) for XPCshell failures in xpcshell/rs-blocklist/test_blocklist_mlbf_fetch.js
Backed out changeset 06fccc75c09e (bug 1620621)
Backed out changeset 8b4e286967c0 (bug 1620621)
Backed out changeset cfde27a748fd (bug 1620621)
Backed out changeset 7abf836343be (bug 1620621)
Backed out changeset 1a28d1de8f76 (bug 1620621)
Backed out changeset 90c08438be0a (bug 1620621)
Backed out changeset 723a3b4e7bbf (bug 1620621)
Backed out changeset bbc991f09d5d (bug 1620621)
2020-04-30 05:44:28 +03:00
Rob Wu cca5bab1f4 Bug 1620621 - Temporarily disable 2 RemoteSettings tests r=glasserc
These two tests use the Kinto client to access the RemoteSettings
database. However, due to the database version bump from D72416,
the kinto client is no longer compatible with the RemoteSettings
database.

This will be fixed in bug 1634203.

Differential Revision: https://phabricator.services.mozilla.com/D73160
2020-04-30 00:34:54 +00:00
Rob Wu 8962b5b5c1 Bug 1620621 - Add initial dump of addons blocklist r=Gijs
The MLBF (addons-mlbf.bin) itself is 64 KB.
Together with the metadata, this is 65 KB.
In contrast, the current JSON-based dump (addons.json) is 913 KB.

Differential Revision: https://phabricator.services.mozilla.com/D73159
2020-04-30 00:34:54 +00:00
Rob Wu 2f5a6bf9d0 Bug 1620621 - Add support for fallback to dumps for attachments r=Gijs,leplatrem
With this piece, it is now possible for RemoteSettings clients to always
have a valid attachment.

This adds the client APIs that could support bug 1542177.

Differential Revision: https://phabricator.services.mozilla.com/D72417
2020-04-29 23:08:08 +00:00
Rob Wu 3c1bafb9ac Bug 1620621 - Add caching and recovery mechanisms to RemoteSettings's download() method r=Gijs,leplatrem
The current RemoteSettings API has two methods for downloading:

- `download(record)` to download an attachment to disk, with a filename
  given by the record. The file is read and returned before downloading.
  A new download attempt overwrites the file, with no recovery mechanism
  if the download fails.
- `downloadAsBytes(record)` to download an attachment in memory.

The `download` method does have a cache, but it is only useful for
reducing bandwidth usage, not for availability of data. Moreover, if its
associated record is removed from the collection, then callers do not
have a way to delete the file since its identifier (filename) originates
from the record.

The `downloadAsBytes` method does not have this file tracking issue
since it does not persist the data, but it forces callers to implement
their own attachment storing mechanism.

This commit adds the `useCache` option to the `download()` method to
enable callers to use an IndexedDB-based cache instead of the
filesystem. The following options unlock significant features:

- `fallbackToCache` - If the requested attachment is not available, the
  last known attachment is returned.
- `fallbackToDump` - If the requested attachment is not available, nor
  cached, then the attachment (dump) that is packaged with the client is
  returned instead. This is implemented in the next commit (D72417).

The original record is cached along with the attachment, to allow
callers to use the file (identified by the given `attachmentId`) and
its metadata, even when the original record has been removed from the
collection.

This is particularly useful for scenarios where one wants to keep a file
(and metadata) up to date via RemoteSettings, without having to develop
a separate storage and synchronization mechanism.

The deprecation of the old behavior will be handled in bug 1634127.

Differential Revision: https://phabricator.services.mozilla.com/D72416
2020-04-29 23:39:07 +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
ffxbld b534feae40 No Bug, mozilla-central repo-update HSTS HPKP remote-settings tld-suffixes - a=repo-update r=RyanVM
Differential Revision: https://phabricator.services.mozilla.com/D72661
2020-04-27 14:21:26 +00:00
Mathieu Leplatre e95ee4d2f4 Bug 1620186 - Fetch from changeset endpoint r=glasserc
Differential Revision: https://phabricator.services.mozilla.com/D71570
2020-04-24 09:15:43 +00:00